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:
Vadim Zeitlin 2019-08-03 14:40:09 +02:00
commit bbac8ca521

View file

@ -531,25 +531,13 @@ public:
virtual int globalfunctionHandler(Node *n) {
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");
if (!SwigType_ispointer(type) && !SwigType_isreference(type))
Setattr(n, "c:retval", "1");
functionWrapper(n);
Delete(cres);
Delete(call);
Delete(arg_list);
return SWIG_OK;
return Language::globalfunctionHandler(n);
}
/* ----------------------------------------------------------------------