summaryrefslogtreecommitdiff
path: root/Lib/swigrun.swg
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2021-12-19 13:03:48 +1300
committerOlly Betts <olly@survex.com>2021-12-19 13:45:25 +1300
commit69b580dfb6e39b5463213908b443a86265bdb23c (patch)
treea50752302231098c7c6a8891afad5ee0408fcde3 /Lib/swigrun.swg
parenta7f2c3d19b898d9c1d6e836164cb69df567aa7ff (diff)
downloadswig-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.swg2
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) {