Re: [PHP-DEV] [PATCH] FNV-1 support for ext/hash

2010-03-24 Thread sean finney
On Wed, Mar 24, 2010 at 10:26:45AM +0100, Pierre Joye wrote: > As far as I can tell that's not only for the hash module. Many areas > in php and its libraries rely on (u)int instead of size_t. It is or > was a common mistake. The problem is to change the signature now > without breaking ABI. > > T

Re: [PHP-DEV] [PATCH] FNV-1 support for ext/hash

2010-03-24 Thread Pierre Joye
hi Sean, On Wed, Mar 24, 2010 at 7:48 AM, sean finney wrote: > okay, so the hash module is generally broken for files > 2GB?  didn't > know that.  i see update functions using both uint and size_t, but the > function pointer signature uses uint so i doubt the hash results would > be correct. As

Re: [PHP-DEV] [PATCH] FNV-1 support for ext/hash

2010-03-23 Thread sean finney
On Tue, Mar 23, 2010 at 11:18:09PM +, Michael Maclean wrote: > >just to throw something out there, shouldn't the various inputLen > >parameters be of type size_t instead of unsigned int? > > The function signature in php_hash.g says unsigned int, so that's > what I used (though I note some of

Re: [PHP-DEV] [PATCH] FNV-1 support for ext/hash

2010-03-23 Thread Michael Maclean
Michael Maclean wrote: The function signature in php_hash.g says unsigned int, so that's what I used (though I note some of the other algorithms appear not to). We don't support files > 2^32 on 64-bit, so as I understand it, it's not going to cause issues right now, but if a large file support

Re: [PHP-DEV] [PATCH] FNV-1 support for ext/hash

2010-03-23 Thread Michael Maclean
sean finney wrote: On Tue, Mar 23, 2010 at 10:01:20PM +, Michael Maclean wrote: The patch: http://mgdm.net/~michael/patches/php-fnv.txt just to throw something out there, shouldn't the various inputLen parameters be of type size_t instead of unsigned int? The function signature in php_h

Re: [PHP-DEV] [PATCH] FNV-1 support for ext/hash

2010-03-23 Thread sean finney
On Tue, Mar 23, 2010 at 10:01:20PM +, Michael Maclean wrote: > The patch: > http://mgdm.net/~michael/patches/php-fnv.txt just to throw something out there, shouldn't the various inputLen parameters be of type size_t instead of unsigned int? sean signature.asc Description: Digital

Re: [PHP-DEV] [PATCH] FNV-1 support for ext/hash

2010-03-23 Thread Derick Rethans
On Tue, 23 Mar 2010, Michael Maclean wrote: > A while back I wrote a patch for ext/hash to add support for the 32- and > 64-bit variants of the FNV-1 hash algorithm. Since we now have a new trunk, I > thought I'd clean it up a bit, and thanks to some suggestions from Pierre and > Johannes on IRC i

[PHP-DEV] [PATCH] FNV-1 support for ext/hash

2010-03-23 Thread Michael Maclean
Hi, A while back I wrote a patch for ext/hash to add support for the 32- and 64-bit variants of the FNV-1 hash algorithm. Since we now have a new trunk, I thought I'd clean it up a bit, and thanks to some suggestions from Pierre and Johannes on IRC it's a bit better now. Would anyone object to

Re: [PHP-DEV] Patch: FNV-1 support for ext/hash

2009-09-16 Thread Michael Maclean
Michael Maclean wrote: Hi, Earlier on someone on IRC mentioned that ext/hash had no support for the FNV-1 hash function (http://en.wikipedia.org/wiki/Fowler-Noll-Vo_hash_function), so I decided to have a go at adding it. I've since updated the patch with some tests based on the ones in the ori

[PHP-DEV] Patch: FNV-1 support for ext/hash

2009-09-04 Thread Michael Maclean
Hi, Earlier on someone on IRC mentioned that ext/hash had no support for the FNV-1 hash function (http://en.wikipedia.org/wiki/Fowler-Noll-Vo_hash_function), so I decided to have a go at adding it. The result of this is the attached patch. Currently it only supports 32-bit and 64-bit versions. I've