Fix Python -builtin and -fastdispatch regression.
Generated code did not compile
This commit is contained in:
parent
dca3b5ac20
commit
040683d1b3
1 changed files with 5 additions and 1 deletions
|
|
@ -2580,7 +2580,11 @@ public:
|
|||
if (castmode) {
|
||||
dispatch = Swig_overload_dispatch_cast(n, dispatch_code, &maxargs);
|
||||
} else {
|
||||
String *fastdispatch_code = NewStringf("PyObject *retobj = %s\nif (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj;\nSWIG_fail;", dispatch_call);
|
||||
String *fastdispatch_code;
|
||||
if (builtin_ctor)
|
||||
fastdispatch_code = NewStringf("int retval = %s\nif (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval;\nSWIG_fail;", dispatch_call);
|
||||
else
|
||||
fastdispatch_code = NewStringf("PyObject *retobj = %s\nif (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj;\nSWIG_fail;", dispatch_call);
|
||||
if (!CPlusPlus) {
|
||||
Insert(fastdispatch_code, 0, "{\n");
|
||||
Append(fastdispatch_code, "\n}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue