Re: [PHP-DEV] retrieveing the zval pointer of an "object"

2004-08-27 Thread Michael Wallner
Hi Andi Gutmans, you wrote: > You can just create a new zval by using > MAKE_STD_ZVAL() and setting the relevant fields. Fair enough; I was searching for kinda ZVAL_OBJ[ECT]() macro at second, without success... > If you get stuck let me know. A tiny piece of code would help a lot :) I can't

Re: [PHP-DEV] retrieveing the zval pointer of an "object"

2004-08-27 Thread Andi Gutmans
There doesn't exist such a thing as the object's zval. An object can have many zval's. The zval includes the object's id and handlers that manage the object's behavior. You can just create a new zval by using MAKE_STD_ZVAL() and setting the relevant fields. If you get stuck let me know. Andi At

Re: [PHP-DEV] retrieveing the zval pointer of an "object"

2004-08-27 Thread Michael Wallner
Hi Andrei Zmievski, you wrote: > The main question is: why do you need to do it? Exercise ;) I'll try to explain after having dinner... Thanks, -- Michael - < mike(@)php.net > signature.asc Description: OpenPGP digital signature

Re: [PHP-DEV] retrieveing the zval pointer of an "object"

2004-08-27 Thread Andrei Zmievski
On Fri, 27 Aug 2004, Michael Wallner wrote: > Hi, > > I have an hopefully simple question; > imagine the following statement: > > obj = (struct obj_struct *) zend_object_store_get_object(zval TSRMLS_CC); > > > Ok, now I'm in a situation where I'd need the other way > round, i.e. a way to fetch

Re: [PHP-DEV] retrieveing the zval pointer of an "object"

2004-08-27 Thread Andrey Hristov
The engine gurus have the final word :) Andrey Michael Wallner wrote: Hi Andrey Hristov, you wrote: isn't the situation that several zvals can reference one object? Should this be read as "No way, sorry"? :) Regards, -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: ht

Re: [PHP-DEV] retrieveing the zval pointer of an "object"

2004-08-27 Thread Michael Wallner
Hi Andrey Hristov, you wrote: > isn't the situation that several zvals can reference one object? Should this be read as "No way, sorry"? :) Regards, -- Michael - < mike(@)php.net > signature.asc Description: OpenPGP digital signature

Re: [PHP-DEV] retrieveing the zval pointer of an "object"

2004-08-27 Thread Andrey Hristov
isn't the situation that several zvals can reference one object? Andrey Michael Wallner wrote: Hi, I have an hopefully simple question; imagine the following statement: obj = (struct obj_struct *) zend_object_store_get_object(zval TSRMLS_CC); Ok, now I'm in a situation where I'd need the other way

[PHP-DEV] retrieveing the zval pointer of an "object"

2004-08-27 Thread Michael Wallner
Hi, I have an hopefully simple question; imagine the following statement: obj = (struct obj_struct *) zend_object_store_get_object(zval TSRMLS_CC); Ok, now I'm in a situation where I'd need the other way round, i.e. a way to fetch the zval of the obj I've got (i.e. I have "obj" and need "zval"