sizeof() != strlen()
| From: | Petr Ferschmann | Date: | Thu, 22 May 2003 10:04:27 +0000 |
| Subject: | sizeof() != strlen() | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-1879@lists.php.net to get a copy of this message | ||
Hello,
I want you let know that sizeof() is not strlen().
It is in macro INIT_CLASS_ENTRY.
When I do this:
char* name = "className";
INIT_CLASS_ENTRY(class_entry, name, function_entry);
Then class_entry.name_length is 3 (pointer - 1).
It works well when I use:
char name[] = "className";
And I have dynamicaly created class types and can't use char[].
With regards