logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: Proposal for a new extension AMFEXT: msg#00101

Subject: Re: Proposal for a new extension AMFEXT
Yah and no C comments // in C++ code either ;), AMF Extension sounds awesome +1

On 2/20/07, Antony Dovgal <antony@xxxxxxxx> wrote:
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

--
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
~
Pedram Nimreezi



<Prev in Thread] Current Thread [Next in Thread>