remove casts for enums - not necessary now that the enum type is used instead of integers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7099 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
508fd65f13
commit
71b3366e0a
2 changed files with 1 additions and 11 deletions
|
|
@ -318,8 +318,7 @@ Swig_cfunction_call(String_or_char *name, ParmList *parms) {
|
|||
if ((SwigType_type(pt) != T_VOID)) {
|
||||
SwigType *rpt = SwigType_typedef_resolve_all(pt);
|
||||
String *pname = Swig_cparm_name(p,i);
|
||||
String *rcaststr = (!cparse_cplusplus && SwigType_isenum(rpt))
|
||||
? Copy(pname): SwigType_rcaststr(rpt, pname);
|
||||
String *rcaststr = SwigType_rcaststr(rpt, pname);
|
||||
|
||||
if (comma) {
|
||||
Printf(func, ",%s", rcaststr);
|
||||
|
|
|
|||
|
|
@ -763,9 +763,6 @@ String *SwigType_rcaststr(SwigType *s, const String_or_char *name) {
|
|||
if (td) {
|
||||
if ((SwigType_isconst(td) || SwigType_isarray(td) || SwigType_isreference(td))) {
|
||||
elements = SwigType_split(td);
|
||||
} else if (SwigType_isenum(td)) {
|
||||
elements = SwigType_split(rs);
|
||||
clear = 0;
|
||||
} else {
|
||||
elements = SwigType_split(rs);
|
||||
}
|
||||
|
|
@ -844,12 +841,6 @@ String *SwigType_rcaststr(SwigType *s, const String_or_char *name) {
|
|||
}
|
||||
Append(result,")");
|
||||
Delete(parms);
|
||||
} else if (SwigType_isenum(element)) {
|
||||
String *bs = SwigType_namestr(element);
|
||||
Insert(result,0," ");
|
||||
Insert(result,0,bs);
|
||||
Delete(bs);
|
||||
clear = 0;
|
||||
} else {
|
||||
String *bs = SwigType_namestr(element);
|
||||
Insert(result,0," ");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue