RE: [PHP-DEV] Extension help
| From: | Marc Boeren | Date: | Tue, 20 Mar 2001 14:59:29 +0000 |
| Subject: | RE: [PHP-DEV] Extension help | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-49504@lists.php.net to get a copy of this message | ||
>> You're almost correct, sizeof("foo") should be sizeof("foo")+1
>hmm... still not working :(
My fault for not reading on beyond the first typo:
>zend_printf("foo = %s",tmpString);
should probably be
zend_printf("foo = %s", (*tmpString)->value.str.val);
but I may be wrong on the level of indirection.
The zval cannot automagically be put in a %s and treated as a string, you
should manually extract the pointer to the actual string.
Hope this helps!
Cheerio, Marc.
(btw, you might have a look at the way the zval struct is set up in the
source code)