Fix support for member const function pointer variables
Was not generating code that compiled when the variable was not a simple member pointer, for example, a const reference member pointer: short (Funcs::* const& cc7)(bool) const = cc1;
This commit is contained in:
parent
685ee6cdc4
commit
eeab152901
4 changed files with 55 additions and 14 deletions
|
|
@ -670,6 +670,7 @@ SwigType *SwigType_ltype(const SwigType *s) {
|
|||
int nelements, i;
|
||||
int firstarray = 1;
|
||||
int notypeconv = 0;
|
||||
int memberpointer = 0;
|
||||
|
||||
result = NewStringEmpty();
|
||||
tc = Copy(s);
|
||||
|
|
@ -707,13 +708,16 @@ SwigType *SwigType_ltype(const SwigType *s) {
|
|||
notypeconv = 1;
|
||||
}
|
||||
if (SwigType_isqualifier(element)) {
|
||||
/* Do nothing. Ignore */
|
||||
if (memberpointer)
|
||||
Append(result, element);
|
||||
/* otherwise ignore */
|
||||
} else if (SwigType_ispointer(element)) {
|
||||
Append(result, element);
|
||||
firstarray = 0;
|
||||
} else if (SwigType_ismemberpointer(element)) {
|
||||
Append(result, element);
|
||||
firstarray = 0;
|
||||
memberpointer = 1;
|
||||
} else if (SwigType_isreference(element)) {
|
||||
if (notypeconv) {
|
||||
Append(result, element);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
* 'a(n).' = Array of size n [n]
|
||||
* 'f(..,..).' = Function with arguments (args)
|
||||
* 'q(str).' = Qualifier (such as const or volatile) (const, volatile)
|
||||
* 'm(qual).' = Pointer to member (qual::*)
|
||||
* 'm(cls).' = Pointer to member (cls::*)
|
||||
*
|
||||
* The complete type representation for varargs is:
|
||||
* 'v(...)'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue