Re: [PHP4BETA] MAKE_STD_ZVAL(): when???
| From: | Andrei Zmievski | Date: | Mon, 28 Feb 2000 14:52:45 +0000 |
| Subject: | Re: [PHP4BETA] MAKE_STD_ZVAL(): when??? | ||
| References: | 1 2 3 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-11128@lists.php.net to get a copy of this message | ||
On Mon, 28 Feb 2000, Chuck Hagenbuch wrote:
> Quoting Andrei Zmievski <andrei@ispi.net>:
>
> > You _never_ call MAKE_STD_ZVAL() on return_value. It's already
> > preallocated for you. MAKE_STD_ZVAL() is used to allocate a new zval.
>
> Okay, that makes sense. Do you call MAKE_STD_ZVAL on every other zval that
> goes _into_ a return value (array or object member), then?
You call MAKE_STD_ZVAL() on any _new_ zval. You don't need to do it on a
zval * if it refers to another zval in the symbol table, for example.
> Are there plans to update CODING_STANDARDS soon (it still refers to php3)?
> If I were to take a shot at re-writing it for php4, would one of the core
> developers be willing to look over it and correct my misunderstandings?
Well, I'm going to be writing some API docs fairly soon as a consequence
of having to give a presentation on how to write PHP extensions at the
O'Reilly conference. Feel free to update CODING_STANDARDS, though, if
you want to.
-Andrei
* If it ain't broken, it doesn't have enough features yet. *