summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2022-10-18 10:28:17 +1300
committerOlly Betts <olly@survex.com>2022-10-18 10:28:17 +1300
commit747a6a264f56711c7b725cf883ef623e01b65922 (patch)
tree91ab34ec9f7e5cc9e07015ae6fc3158833357b38 /Lib
parentd8a028601247e96c15bbaac08100cce0401f186e (diff)
downloadswig-747a6a264f56711c7b725cf883ef623e01b65922.tar.gz
[php] Fix handling of multi-module cases
Look up unknown base classes using SWIG_MangledTypeQueryModule(). Revert to using SWIG_TypeCheck() instead of SWIG_TypeCheckStruct() as the latter doesn't seem to work for this case (at least for PHP right now). Add mod_runme.php as a regression test for this. Adjust the PHP test harness not to set up reflection for the module unless it's actually needed for a testcase. Currently the approach to find the module name doesn't work for multi-module testcases. See #2126
Diffstat (limited to 'Lib')
-rw-r--r--Lib/php/phprun.swg2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/php/phprun.swg b/Lib/php/phprun.swg
index 538b7e165..d3ad0d26a 100644
--- a/Lib/php/phprun.swg
+++ b/Lib/php/phprun.swg
@@ -193,7 +193,7 @@ SWIG_ConvertPtrAndOwn(zval *z, void **ptr, swig_type_info *ty, int flags, swig_o
/* They don't care about the target type, so just pass on the pointer! */
*ptr = value->ptr;
} else {
- swig_cast_info *tc = SWIG_TypeCheckStruct(value->type, ty);
+ swig_cast_info *tc = SWIG_TypeCheck(value->type->name, ty);
if (tc) {
int newmemory = 0;
*ptr = SWIG_TypeCast(tc, value->ptr, &newmemory);