|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-07-12 14:34 UTC] ab@php.net
-Status: Open
+Status: Not a bug
[2017-07-12 14:34 UTC] ab@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 07:00:01 2026 UTC |
Description: ------------ INIT_CLASS_ENTRY macro should not use sizeof e.g. such usage is valid: INIT_CLASS_ENTRY(ce, "MyCustomClass", NULL); as compiler uses such directives: INIT_OVERLOADED_CLASS_ENTRY (class_container, class_name, functions, NULL, NULL, NULL) INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, sizeof(class_name)-1, functions, handle_fcall, handle_propget, handle_propset, NULL, NULL) but if INIT_CLASS_ENTRY is used in the function like: void InitClass(const char *class_name) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, class_name, NULL); will fail due the: INIT_OVERLOADED_CLASS_ENTRY_EX define implementation: sizeof(class_name)-1 maybe strlen (run-time) should be used to allow INIT_CLASS_ENTRY macro more general usage.