ok, I have managed to add a member variable, but am having problems when i try to
retreive it using zend_find_hash
here's the code :
for the extension :
PHP_FUNCTION(create_object)
{
... other stuff
add_property_string(return_value,"foo","hello!",1);
... other stuff
zend_hash_find(obj-value.obj.properties,"foo",sizeof("foo"),(void**)tmpSt
ring);
You're almost correct, sizeof("foo") should be sizeof("foo")+1
Cheerio, Marc.
--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
On Tue, Mar 20, 2001 at 03:24:00PM +0100, Marc Boeren wrote:
zend_hash_find(obj-value.obj.properties,"foo",sizeof("foo"),(void**)tmpSt
ring);
You're almost correct, sizeof("foo") should be sizeof("foo")+1
hmm... still not working :(
Cheerio, Marc.
--
PHP Development Mailing
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
On Tue, Mar 20, 2001 at 03:59:29PM +0100, Marc Boeren wrote:
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 =
Hi!
even though i did convert_to_string_ex(tmpString) ?
You should still do that, but the only thing that really does is set the
zval type to IS_STRING, and the value union is set accordingly (instead of
e.g. a long in value.lval, you get the value as a string in value.str.val
(and the
BM but I may be wrong on the level of indirection.
BM The zval cannot automagically be put in a %s and treated as a string, you
BM should manually extract the pointer to the actual string.
BM
BM even though i did convert_to_string_ex(tmpString) ?
The convert_to_string_ex makes tmpString to be
On Tue, Mar 20, 2001 at 05:15:58PM +0100, Marc Boeren wrote:
BTW, (*tmpString)-value.str.val == Z_STRVAL_PP(tmpString) but the
latter looks much nicer :)
Granted, but that's what happens if you just examine the code and don't read
the documentation :-)
is there full documentation of the
MB If there is, I couldn't find it either.
The docs are at http://www.zend.com/apidoc/
--
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115
--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
On Tue, Mar 20, 2001 at 06:48:39PM +0200, Stanislav Malyshev wrote:
BM is there full documentation of the Zend API - i found the stuff
BM on the zend website to be useful, but didn't cover everything.
Well, that's the most full one that exists. Eventually, it should be
extended to cover the
On Tue, 20 Mar 2001, Barry Mitchelson wrote:
ok, I have managed to add a member variable, but am having problems when i try to
retreive it using zend_find_hash
here's the code :
for the extension :
PHP_FUNCTION(create_object)
{
... other stuff
On Mon, 19 Mar 2001, Barry Mitchelson wrote:
hey,
I'm writing an extension which defines a class. In the constructor, I'd like to
create a member variable which I can then access with the other member functions in
my extension.
In php it would be like :
class foo
{
var
12 matches
Mail list logo