Re: [PHP4BETA] Questions regarding the zend API
| From: | Andrei Zmievski | Date: | Fri, 17 Mar 2000 14:04:44 +0000 |
| Subject: | Re: [PHP4BETA] Questions regarding the zend API | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-12322@lists.php.net to get a copy of this message | ||
On Fri, 17 Mar 2000, Ted Parnefors wrote:
> What's the difference between a pval and a zval? They seem to be used in
> the same manner but in some modules referenced as pval, and in some as
> zval.
There is no difference.
> I define "pval *myobject"
> then I have a loop similar to:
>
> MAKE_STD_>VAL(myobject);
> object_init(myobject); // yes, I need to check this for errors.
> add_property(myobject,"name","this is my name",1);
> add_property(myobject,"size","this is my size",1);
> add_next_index_object(return_value,myobject);
> // Ehm... Don't I need free the memory used by my object?
> // How do I do that?
>
> (and return_value has been initialized as an array)
>
> What happens to me is that my first object appears as number 3 in the
> returning array, the first two elements are just two empty objects it
> seems. Why?
I don't even know where you found add_next_index_object(), it's not in
Zend...
-Andrei
* Proximity bug: when the code crashes in front of important visitors. *