Re: Proposal: ext/staf_module (IBM STAF)

From: Date: Thu, 13 May 2004 07:26:34 +0000
Subject: Re: Proposal: ext/staf_module (IBM STAF)
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-636@lists.php.net to get a copy of this message
On Wed, 12 May 2004, Daniel Mcfarlin wrote: > I've developed a PHP extension for IBM STAF. STAF is > a multi-platform RPC/IPC framework intended for software > testing and automation. Complete details on STAF are > available at: Why don't you call it ext/staf instead of ext/staf_module? > http://staf.sourceforge.net > > STAF carries the LGPL but I intend to release > the staf_module under the PHP license (see the README). > > The PHP extension implementation is available at > http://www.cs.indiana.edu/~dmcfarli/staf_module.tar.gz void my_destruction_handler(zend_rsrc_list_entry *rsrc TSRMLS_DC) you should namepsace protect this one, like staf_destruction_handler (and additionally make it a static if possible). For new extensions we also recommend using zend_parse_parameters over zend_get_parameters, and if you use parse_parameters, there is no reason to check for ZEND_NUM_ARGS() yourself. Instead of zend_error, consider using php_error_docref as that gives users a standard error message and already prepends the active function name. For memory allocation functions, always use the php ones "emalloc, efree, estrdup" as they are taking into account with the memory_limit. Providing strndup and strnlen yourself might not be a good idea either like you did, as it is possible that PHP itself has a replacement for them already, and IF you provide them, make sure to namespace protect them again. Besides these little things in the code, i would recommend to have a look at the CODING_STANDARDS guidelines, whihc you can find in the root of the PHP CVS tree. (And have a look how other code in extensions look likes). regards, Derick

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