Edit report at http://bugs.php.net/bug.php?id=53196&edit=1
ID: 53196
User updated by: sven dot assmann at lubico dot biz
Reported by: sven dot assmann at lubico dot biz
Summary: zend_API.h has an error in
INIT_OVERLOADED_CLASS_ENTRY Macro
Status: Bogus
Type: Bug
Package: Unknown/Other Function
Operating System: Linux
PHP Version: 5.3.3
Block user comment: N
New Comment:
the macro is used by INIT_CLASS_ENTRY, if it is not a bug, what is the
right way
to initialize a class at runtime?
I think the change on the macro will work for both ways compiletime and
runtime..
Previous Comments:
------------------------------------------------------------------------
[2010-10-28 22:33:48] [email protected]
This is not a bug, the macro is intended to use sizeof.
You need to use the literal string in the macro, not a variable.
------------------------------------------------------------------------
[2010-10-28 21:43:37] sven dot assmann at lubico dot biz
Description:
------------
#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)
leads to a segfault..
change it like
#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,
strlen(class_name)+1, functions, handle_fcall, handle_propget,
handle_propset,
NULL, NULL)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53196&edit=1