Questions regarding the zend API
| From: | Ted Parnefors | Date: | Fri, 17 Mar 2000 07:39:51 +0000 |
| Subject: | Questions regarding the zend API | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-12306@lists.php.net to get a copy of this message | ||
I'm trying to figure out how to extend the functionality of an existing
php-extension module, but I have some small questions.
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.
I'm trying to create an array of objects, but i'm not sure how I destroy
a temporary object that I created, or in fact maybe I even shouldn't I
don't know. What I'm doing is the following.
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?
Any hints anyone?
--
Ted Parnefors <ted@mtv.se>, KeyID 0x6627DEE4
PGP Fingerprint 1C39FA94703EB54A011CF18932018E256627DEE4