diff options
author | Olly Betts <olly@survex.com> | 2021-12-19 13:03:48 +1300 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2021-12-19 13:45:25 +1300 |
commit | 69b580dfb6e39b5463213908b443a86265bdb23c (patch) | |
tree | a50752302231098c7c6a8891afad5ee0408fcde3 /Lib/swigrun.swg | |
parent | a7f2c3d19b898d9c1d6e836164cb69df567aa7ff (diff) | |
download | swig-69b580dfb6e39b5463213908b443a86265bdb23c.tar.gz |
[php] Use SWIG_TypeCheckStruct to check types
We have the swig_type_info available and SWIG_TypeCheckStruct
is more efficient because it uses a pointer comparison instead of the
string comparison SWIG_TypeCheck uses (this change speeds up `make
check-php-test-suite` by about 10%).
Diffstat (limited to 'Lib/swigrun.swg')
-rw-r--r-- | Lib/swigrun.swg | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/swigrun.swg b/Lib/swigrun.swg index 5f3159916..de0db2dc3 100644 --- a/Lib/swigrun.swg +++ b/Lib/swigrun.swg @@ -290,7 +290,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) { Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { +SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { |