Eliminate $needNewFlow from factory.i

$needNewFlow in an output typemap is now only relevant when wrapping
to a PHP __construct method, and there the return type is known so
factory.i isn't useful.
This commit is contained in:
Olly Betts 2021-04-21 16:32:56 +12:00
commit 5577257301

View file

@ -95,7 +95,7 @@ if (!dcast) {
Type *dobj = dynamic_cast<Type *>($1);
if (dobj) {
dcast = 1;
SWIG_SetZval(return_value, $needNewFlow-0, $owner, SWIG_as_voidptr(dobj), $descriptor(Type *));
SWIG_SetPointerZval(return_value, SWIG_as_voidptr(dobj), $descriptor(Type *), $owner);
}
}%enddef
@ -104,6 +104,6 @@ if (!dcast) {
int dcast = 0;
%formacro(%_factory_dispatch, Types)
if (!dcast) {
SWIG_SetZval(return_value, $needNewFlow-0, $owner, SWIG_as_voidptr($1), $descriptor);
SWIG_SetPointerZval(return_value, SWIG_as_voidptr($1), $descriptor, $owner);
}
}%enddef