Hi Ivan,

> -----Original Message-----
> From: Ivan Pomortsev <ivan.pomort...@gmail.com>
> Sent: Monday, May 7, 2018 12:47 AM
> To: pecl-dev@lists.php.net
> Subject: [PECL-DEV] clusterize extension
> 
> Hello,
> I'm Ivan Pomortsev
> 
> I want you to review my extension for clustering geo points on maps and apply 
> it
> to publish at pecl.php.net.
> Source code is available here: https://github.com/iworker/clusterize
> 
Here's a quick review

- GPL'd extensions unfortunately are not accepted in PECL
- arData should not be accessed directly, please check ZEND_HASH_FOREACH* macro 
family in zend_hash.h
- variable clusters_count is declared as zval, read_in as "l" from ZPP and then 
casted to uint32_t. Likely it should be zend_long.
- functions like kmeans_malloc could be patched to use Zend allocator, since 
the file is bundled anyway
- config.w32 could be added
- PHP's core sticks to C89. The code contains mixed declarations, one line 
comments and some functions like lroundf, which are C99 actually. Probably not 
critical nowadays, but beyond portability issues can be expected.

Regards

Anatol

Reply via email to