Don't reimplement base class version of globalfunctionHandler()
This is useless and the C-specific version didn't handle template methods added with %extend correctly, so removing this code also fixes some (but not all yet) failures in extend_template_method.cpptest unit test.
This commit is contained in:
parent
b0d99a1cc3
commit
bbac8ca521
1 changed files with 1 additions and 13 deletions
|
|
@ -531,25 +531,13 @@ public:
|
||||||
|
|
||||||
virtual int globalfunctionHandler(Node *n) {
|
virtual int globalfunctionHandler(Node *n) {
|
||||||
SwigType *type = Getattr(n, "type");
|
SwigType *type = Getattr(n, "type");
|
||||||
ParmList *parms = Getattr(n, "parms");
|
|
||||||
String *arg_list = NewString("");
|
|
||||||
String *call = empty_string;
|
|
||||||
String *cres = empty_string;
|
|
||||||
|
|
||||||
call = Swig_cfunction_call(Getattr(n, "name"), parms);
|
|
||||||
cres = Swig_cresult(type, "result", call);
|
|
||||||
Setattr(n, "wrap:action", cres);
|
|
||||||
Setattr(n, "c:globalfun", "1");
|
Setattr(n, "c:globalfun", "1");
|
||||||
|
|
||||||
if (!SwigType_ispointer(type) && !SwigType_isreference(type))
|
if (!SwigType_ispointer(type) && !SwigType_isreference(type))
|
||||||
Setattr(n, "c:retval", "1");
|
Setattr(n, "c:retval", "1");
|
||||||
|
|
||||||
functionWrapper(n);
|
return Language::globalfunctionHandler(n);
|
||||||
|
|
||||||
Delete(cres);
|
|
||||||
Delete(call);
|
|
||||||
Delete(arg_list);
|
|
||||||
return SWIG_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue