json.c: json_encode_array passing &val?

From: Date: Sat, 05 Nov 2011 21:58:42 +0000
Subject: json.c: json_encode_array passing &val?
Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-8807@lists.php.net to get a copy of this message
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?

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