summaryrefslogtreecommitdiff
path: root/Lib/php
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2014-02-17 16:24:04 +1300
committerOlly Betts <olly@survex.com>2014-02-17 16:24:04 +1300
commit052d0057c2d96f013dbc3a477a46a10672db9094 (patch)
treec48845cc66042828724d0462a956cc64aca58b74 /Lib/php
parentd7f91bc47a98f5b2afa71315e8c7636c3a029be5 (diff)
downloadswig-052d0057c2d96f013dbc3a477a46a10672db9094.tar.gz
Only call strlen(lc_fname) if we are going to use the result
Diffstat (limited to 'Lib/php')
-rw-r--r--Lib/php/director.swg3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/php/director.swg b/Lib/php/director.swg
index 50b433e47..6671f5580 100644
--- a/Lib/php/director.swg
+++ b/Lib/php/director.swg
@@ -102,12 +102,11 @@ namespace Swig {
TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
zend_class_entry **ce;
zend_function *mptr;
- int name_len = strlen(lc_fname);
if (zend_lookup_class(cname, strlen(cname), &ce TSRMLS_CC) != SUCCESS) {
return false;
}
- if (zend_hash_find(&(*ce)->function_table, lc_fname, name_len + 1, (void **) &mptr) != SUCCESS) {
+ if (zend_hash_find(&(*ce)->function_table, lc_fname, strlen(lc_fname) + 1, (void **) &mptr) != SUCCESS) {
return false;
}
// common.scope points to the declaring class