Only call strlen(lc_fname) if we are going to use the result
This commit is contained in:
parent
d7f91bc47a
commit
052d0057c2
1 changed files with 1 additions and 2 deletions
|
|
@ -102,12 +102,11 @@ namespace Swig {
|
||||||
TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
|
TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
|
||||||
zend_class_entry **ce;
|
zend_class_entry **ce;
|
||||||
zend_function *mptr;
|
zend_function *mptr;
|
||||||
int name_len = strlen(lc_fname);
|
|
||||||
|
|
||||||
if (zend_lookup_class(cname, strlen(cname), &ce TSRMLS_CC) != SUCCESS) {
|
if (zend_lookup_class(cname, strlen(cname), &ce TSRMLS_CC) != SUCCESS) {
|
||||||
return false;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
// common.scope points to the declaring class
|
// common.scope points to the declaring class
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue