File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -124,26 +124,26 @@ int zend_autoload_register(zend_autoload_func* func, zend_bool prepend)
124
124
125
125
int zend_autoload_unregister (zend_autoload_func * func )
126
126
{
127
- zval * val ;
128
127
zend_ulong h ;
129
128
130
- zval func_name = func -> fci .function_name ;
131
- zval current ;
129
+ zval * func_name = & func -> fci .function_name ;
130
+ zval * current_name ;
131
+ zend_autoload_func * current ;
132
132
133
- ZEND_HASH_FOREACH_NUM_KEY_VAL (& EG (autoload .functions ), h , val )
134
- current = (( zend_autoload_func * ) Z_PTR_P ( val )) -> fci .function_name ;
135
- if (Z_TYPE (func_name ) != Z_TYPE ( current )) {
133
+ ZEND_HASH_FOREACH_NUM_KEY_PTR (& EG (autoload .functions ), h , current )
134
+ current_name = & current -> fci .function_name ;
135
+ if (Z_TYPE_P (func_name ) != Z_TYPE_P ( current_name )) {
136
136
continue ;
137
137
}
138
- switch (Z_TYPE (func_name )) {
138
+ switch (Z_TYPE_P (func_name )) {
139
139
case IS_STRING :
140
- if (zend_string_equals (Z_STR (func_name ), Z_STR ( current ))) {
140
+ if (zend_string_equals (Z_STR_P (func_name ), Z_STR_P ( current_name ))) {
141
141
// unset this one
142
142
zend_hash_index_del (& EG (autoload .functions ), h );
143
143
return SUCCESS ;
144
144
}
145
145
case IS_OBJECT :
146
- if (Z_OBJ_HANDLE ( current ) == Z_OBJ_HANDLE (func_name )) {
146
+ if (Z_OBJ_HANDLE_P ( current_name ) == Z_OBJ_HANDLE_P (func_name )) {
147
147
// unset this one
148
148
zend_hash_index_del (& EG (autoload .functions ), h );
149
149
return SUCCESS ;
You can’t perform that action at this time.
0 commit comments