Re: cvs: php4 /ext/standard fsock.c
| From: | Andi Gutmans | Date: | Wed, 18 Oct 2000 21:46:09 +0000 |
| Subject: | Re: cvs: php4 /ext/standard fsock.c | ||
| References: | 1 2 3 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-2122@lists.php.net to get a copy of this message | ||
At 11:26 PM 10/18/00 +0200, Stig Venaas wrote:
On Wed, Oct 18, 2000 at 10:24:26PM +0200, Andi Gutmans wrote: Your code is wrong. If you get parameters with the _ex API they are Not more wrong than the original then, but I would like to fix it. read-only. This means you can't change them because the zval's are reference counted and maybe some other variables are also pointing there. You should probably move this function to the non-ex API. Had a quick look at zend_get_parameters, think I got your point. Things should be just fine by simply using zend_get_parameters instead of the _ex one, right? Or is there more to it? I'll test this change and commit it unless I hear anything.Basically if you are using the _ex functions the resulting zval **'s are read-only. If you just simply convert the zval **'s to zval *'s and use the non-_ex functions you should be just fine. You are allowed to change their values. Just make sure you don't touch the reference count and is_ref.
At least the code is getting better, and I'm learning (:Yep! That code was always quite messy :) Thanks, Andi --- Andi Gutmans <andi@zend.com> http://www.zend.com/