Re: New extension proposal (geohash)
| From: | Johannes Schlüter | Date: | Fri, 08 Sep 2017 09:17:08 +0000 |
| Subject: | Re: New extension proposal (geohash) | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-14830@lists.php.net to get a copy of this message | ||
Hi,
> I'd like to propose a new extension named geohash, that brings
> geohash
on a quick review this looks good.
Two small comments:
hash = (char*)emalloc(sizeof(char) * (precision + 1));
this might overflow. Better use safe_emalloc which calculates the
buffer size in an overflow-safe way.
Secondly I'd suggest moving macro definitions and structure definitions
from the header to the implementation file. For a stand-alone extension
it's not a big deal, but for static builds it's an issue, see
https://wiki.php.net/internals/review_comments#php_extnameh_should_be_m
inimal
johannes