Skip to content

Commit f61da2a

Browse files
authored
intl: refactor php_converter_resolve_callback() (#23666)
Rename zend_object parameter to this_ptr to clarify meaning for FCC struct. Remove assignment to the calling_scope field, as this is never read by zend_call_function().
1 parent 063d787 commit f61da2a

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

ext/intl/converter/converter.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -504,23 +504,20 @@ PHP_METHOD(UConverter, getDestinationType) {
504504
}
505505
/* }}} */
506506

507-
/* {{{ php_converter_resolve_callback */
508507
static void php_converter_resolve_callback(
509508
zend_fcall_info_cache *fcc,
510-
zend_object *obj,
509+
zend_object *this_ptr,
511510
const char *callback_name,
512511
size_t callback_name_len
513512
) {
514-
zend_function *fn = reinterpret_cast<zend_function *>(zend_hash_str_find_ptr_lc(&obj->ce->function_table, callback_name, callback_name_len));
513+
zend_function *fn = reinterpret_cast<zend_function *>(zend_hash_str_find_ptr_lc(&this_ptr->ce->function_table, callback_name, callback_name_len));
515514
ZEND_ASSERT(fn != nullptr);
516515

517516
fcc->function_handler = fn;
518-
fcc->object = obj;
519-
fcc->called_scope = obj->ce;
520-
fcc->calling_scope = nullptr;
517+
fcc->object = this_ptr;
518+
fcc->called_scope = this_ptr->ce;
521519
fcc->closure = nullptr;
522520
}
523-
/* }}} */
524521

525522
/* {{{ */
526523
PHP_METHOD(UConverter, __construct) {

0 commit comments

Comments
 (0)