Re: json.c: json_encode_array passing &val?

From: Date: Sat, 05 Nov 2011 22:05:27 +0000
Subject: Re: json.c: json_encode_array passing &val?
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-8808@lists.php.net to get a copy of this message
On Sat, 05 Nov 2011 21:58:42 -0000, J. Adams <zardozrocks@gmail.com> wrote:
I'm working to resurrect the amfext extension and I'm using the JSON source code as my guide. Forgive me as my C/C++ is very rusty and pointers present a challenge. I'm wondering why on line 475 we pass the address of val (&val) to the function json_encode_array and then within that function we must doubly dereference it using the *_PP macros. Is it necessary to pass an address rather than just val itself?
From what I can tell, a zval* would be enough here. Not everything has to make sense! -- Gustavo Lopes

« previous php.pecl.dev (#8808) next »