Perform proper spacing in director method declarations
If a director method returns a const pointer, eg. 'int *const', then in its method declaration a space has to be inserted between 'const' and the method name. This fixes swig#1810.
This commit is contained in:
parent
09a5b83aac
commit
c259702314
3 changed files with 17 additions and 3 deletions
|
|
@ -160,7 +160,7 @@ String *Swig_method_decl(SwigType *return_base_type, SwigType *decl, const_Strin
|
|||
SwigType *rettype_stripped = SwigType_strip_qualifiers(rettype);
|
||||
String *rtype = SwigType_str(rettype, 0);
|
||||
Append(result, rtype);
|
||||
if (SwigType_issimple(rettype_stripped) && return_base_type)
|
||||
if ((SwigType_issimple(rettype_stripped) && return_base_type) || SwigType_isqualifier(rettype))
|
||||
Append(result, " ");
|
||||
Delete(rtype);
|
||||
Delete(rettype_stripped);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue