Closed

Description
Description
This works:
INIT_CLASS_ENTRY(ce, "mylongclassname", methods);
This does not:
void register_class(zend_class_entry * ce, const char * name, const zend_function_entry * methods) {
INIT_CLASS_ENTRY(ce, name, methods);
}
register_class(ce, "mylongclassname", methods);
Because INIT_OVERLOADED_CLASS_ENTRY
uses sizeof()
to determine class_name_len:
#define INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, handle_fcall, handle_propget, handle_propset) \
INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, sizeof(class_name)-1, functions, handle_fcall, handle_propget, handle_propset, NULL, NULL
PHP Version
All
Operating System
All