Re: php extension for lib Judy
| From: | Antony Dovgal | Date: | Thu, 16 Sep 2010 10:05:11 +0000 |
| Subject: | Re: php extension for lib Judy | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-7642@lists.php.net to get a copy of this message | ||
On 08/18/2010 03:27 PM, Nicolas Brousse wrote:
> Hi,
>
> I'm writing you guys because I started to work on a PHP extension for
> the lib Judy. I have most of the Judy API implemented but still have a
> bunch of work to do to get something clean for php (like implementing
> iterators methods, test the windows version, etc).
>
> I never did a php extension before, so any feedbacks are welcome :
> http://github.com/orieg/php-judy#readme
PHP_METHOD(judy, last_empty);
PHP_METHOD(judy, prev_empty);
AFAIK "camelCase" naming system is de-facto standard for PHP extensions,
would be good to see these methods renamed to lastEmpty(), prevEmpty() and so on.
Also I don't quite see any point in calling methods with zend_call_method_with_X_params()
if these very methods are defined several lines above - you can just move the body of the
method to an internal function and call it directly, not through ZE API (that would also
buy you some more performance).
You should also prevent calling __construct() several times, from what I can see atm it results in a
memleak.
Some whitespaces->tabs fixes are also required.
--
Wbr,
Antony Dovgal
---
http://pinba.org - realtime statistics for PHP