Re: Proposal for a new extension AMFEXT
| From: | Antony Dovgal | Date: | Tue, 20 Feb 2007 10:17:45 +0000 |
| Subject: | Re: Proposal for a new extension AMFEXT | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-4573@lists.php.net to get a copy of this message | ||
On 02/13/2007 03:17 PM, Emanuele Ruffaldi wrote:
Hello everybody, I would like to propose to add a new PECL extension for encoding and decoding ActionScript Messages (AMF) for faster data exchange between PHP and Flash.Please before publishing the extension in PECL make sure the extension code conforms our coding standards. - no C++ comments in C code, please. - please use .phpt tests, they are the most preferred method to test extensions. - use vim folding markers to make the code more readable (even if you don't use vim yourself) - always use brackets in "if (..) { code }", it's much more readable than "if (..) code"; Things like this look like a bug (isn't this a bug, btw?): ...
}
else
object_init_ex(*rval, *classEntry);
htOutput = Z_OBJPROP_PP(rval);
...
One more place that made me wonder after quick look at the code:
#define AMF_DEALLOC(x) if((x)->refcount <= 1) {zval_dtor((x)); FREE_ZVAL((x));}else{ZVAL_DELREF((x));}
This looks pretty much like zval_ptr_dtor() or ZVAL_PTR_DTOR.
Why did you reimplement it?
--
Wbr,
Antony Dovgal