Skip to content

Commit 91e5452

Browse files
committed
Remove unused lc_class_name variable
This is probably a leftover from "old style constructor" support.
1 parent 19de727 commit 91e5452

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

Zend/zend_API.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2150,8 +2150,6 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
21502150
zend_function *ctor = NULL, *dtor = NULL, *clone = NULL, *__get = NULL, *__set = NULL, *__unset = NULL, *__isset = NULL, *__call = NULL, *__callstatic = NULL, *__tostring = NULL, *__debugInfo = NULL, *__serialize = NULL, *__unserialize = NULL;
21512151
zend_string *lowercase_name;
21522152
size_t fname_len;
2153-
const char *lc_class_name = NULL;
2154-
size_t class_name_len = 0;
21552153

21562154
if (type==MODULE_PERSISTENT) {
21572155
error_type = E_CORE_WARNING;
@@ -2166,17 +2164,6 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
21662164
internal_function->module = EG(current_module);
21672165
memset(internal_function->reserved, 0, ZEND_MAX_RESERVED_RESOURCES * sizeof(void*));
21682166

2169-
if (scope) {
2170-
class_name_len = ZSTR_LEN(scope->name);
2171-
if ((lc_class_name = zend_memrchr(ZSTR_VAL(scope->name), '\\', class_name_len))) {
2172-
++lc_class_name;
2173-
class_name_len -= (lc_class_name - ZSTR_VAL(scope->name));
2174-
lc_class_name = zend_str_tolower_dup(lc_class_name, class_name_len);
2175-
} else {
2176-
lc_class_name = zend_str_tolower_dup(ZSTR_VAL(scope->name), class_name_len);
2177-
}
2178-
}
2179-
21802167
while (ptr->fname) {
21812168
fname_len = strlen(ptr->fname);
21822169
internal_function->handler = ptr->handler;
@@ -2250,14 +2237,10 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
22502237
}
22512238
} else {
22522239
if (scope && (scope->ce_flags & ZEND_ACC_INTERFACE)) {
2253-
efree((char*)lc_class_name);
22542240
zend_error(error_type, "Interface %s cannot contain non abstract method %s()", ZSTR_VAL(scope->name), ptr->fname);
22552241
return FAILURE;
22562242
}
22572243
if (!internal_function->handler) {
2258-
if (scope) {
2259-
efree((char*)lc_class_name);
2260-
}
22612244
zend_error(error_type, "Method %s%s%s() cannot be a NULL function", scope ? ZSTR_VAL(scope->name) : "", scope ? "::" : "", ptr->fname);
22622245
zend_unregister_functions(functions, count, target_function_table);
22632246
return FAILURE;
@@ -2359,9 +2342,6 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
23592342
zend_string_release(lowercase_name);
23602343
}
23612344
if (unload) { /* before unloading, display all remaining bad function in the module */
2362-
if (scope) {
2363-
efree((char*)lc_class_name);
2364-
}
23652345
while (ptr->fname) {
23662346
fname_len = strlen(ptr->fname);
23672347
lowercase_name = zend_string_alloc(fname_len, 0);
@@ -2389,7 +2369,6 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
23892369
scope->__debugInfo = __debugInfo;
23902370
scope->__serialize = __serialize;
23912371
scope->__unserialize = __unserialize;
2392-
efree((char*)lc_class_name);
23932372
}
23942373
return SUCCESS;
23952374
}

0 commit comments

Comments
 (0)