fix reference/pointers op. in pointer assgiments, reported by Surendra Singhi
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8008 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4fa643a9d2
commit
1694f7fd5c
2 changed files with 23 additions and 21 deletions
|
|
@ -107,3 +107,20 @@ int* const globalRet2() {return &GlobalInt;}
|
|||
return b;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
%{
|
||||
static int wxEVT_COMMAND_BUTTON_CLICKEDv;
|
||||
static int **wxEVT_COMMAND_BUTTON_CLICKEDp;
|
||||
%}
|
||||
|
||||
|
||||
%inline {
|
||||
#define EWXWEXPORT_VAR
|
||||
|
||||
const int* wxEVENT_COMMAND_BUTTON_CLICKEDr = (int*) &wxEVT_COMMAND_BUTTON_CLICKEDv;
|
||||
const int* wxEVENT_COMMAND_BUTTON_CLICKEDp = (int*) *wxEVT_COMMAND_BUTTON_CLICKEDp;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4413,27 +4413,6 @@ def_args : EQUAL definetype {
|
|||
$$.throw = 0;
|
||||
}
|
||||
}
|
||||
| EQUAL AND declarator {
|
||||
Node *n = Swig_symbol_clookup($3.id,0);
|
||||
if (n) {
|
||||
String *q = Swig_symbol_qualified(n);
|
||||
if (q) {
|
||||
String *temp = NewStringf("%s::%s", q, Getattr(n,"name"));
|
||||
$$.val = NewStringf("&%s", SwigType_str($3.type,temp));
|
||||
Delete(q);
|
||||
Delete(temp);
|
||||
} else {
|
||||
$$.val = NewStringf("&%s", SwigType_str($3.type,$3.id));
|
||||
}
|
||||
} else {
|
||||
$$.val = NewStringf("&%s",SwigType_str($3.type,$3.id));
|
||||
}
|
||||
$$.rawval = 0;
|
||||
$$.type = T_USER;
|
||||
$$.bitfield = 0;
|
||||
$$.throws = 0;
|
||||
$$.throw = 0;
|
||||
}
|
||||
| EQUAL LBRACE {
|
||||
skip_balanced('{','}');
|
||||
$$.val = 0;
|
||||
|
|
@ -5311,7 +5290,13 @@ expr : exprnum { $$ = $1; }
|
|||
$$.val = NewStringf("(%s) %s", SwigType_str($2.val,0), $6.val);
|
||||
}
|
||||
}
|
||||
| AND expr {
|
||||
$$.val = NewStringf("&%s",$2.val);
|
||||
}
|
||||
;
|
||||
| STAR expr {
|
||||
$$.val = NewStringf("*%s",$2.val);
|
||||
}
|
||||
|
||||
exprnum : NUM_INT { $$ = $1; }
|
||||
| NUM_FLOAT { $$ = $1; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue