diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..29c127d1 --- /dev/null +++ b/composer.json @@ -0,0 +1,18 @@ +{ + "name": "pierrejoye/igbinary", + "version": "1.2.2-dev", + "type": "extension", + "description": "igbinary extension", + "keywords": ["serializer", "compression"], + "stability": "stable", + "license": [ + "New BSD" + ], + "homepage": "https://github.com/pierrejoye/igbinary", + "authors": [ + { + "name": "Teddy Grenman", + "email": "teddy.pecl@luuseri.com" + } + ] +} diff --git a/config.w32 b/config.w32 index 66cd88bd..52d20f5b 100644 --- a/config.w32 +++ b/config.w32 @@ -4,7 +4,11 @@ ARG_ENABLE("igbinary", "whether to enable igbinary support", "no"); if (PHP_IGBINARY == "yes") { - EXTENSION("igbinary", "igbinary.c hash_si.c hash_function.c"); - AC_DEFINE('HAVE_IGBINARY', 1, 'Have igbinary support', false); - ADD_EXTENSION_DEP('igbinary', 'session'); + res = CHECK_HEADER_ADD_INCLUDE("apc_serializer.h", "CFLAGS_IGBINARY", "..\\pecl\\apc;ext\\apc"); + if (res) { + AC_DEFINE('HAVE_APC_SUPPORT', 1, 'Whether to enable apc support') + } + EXTENSION("igbinary", "igbinary.c hash_si.c hash_function.c"); + AC_DEFINE('HAVE_IGBINARY', 1, 'Have igbinary support', false); + ADD_EXTENSION_DEP('igbinary', 'session'); } diff --git a/igbinary.c b/igbinary.c index 77c4b14b..d2431080 100644 --- a/igbinary.c +++ b/igbinary.c @@ -268,6 +268,7 @@ PHP_MINIT_FUNCTION(igbinary) { #endif #if HAVE_APC_SUPPORT + apc_register_serializer("igbinary", APC_SERIALIZER_NAME(igbinary), APC_UNSERIALIZER_NAME(igbinary), @@ -373,7 +374,7 @@ PHP_FUNCTION(igbinary_unserialize) { } if (string_len <= 0) { - RETURN_NULL(); + RETURN_FALSE; } if (igbinary_unserialize((uint8_t *) string, string_len, &return_value TSRMLS_CC)) { @@ -517,7 +518,7 @@ PS_SERIALIZER_DECODE_FUNC(igbinary) { #ifdef HAVE_APC_SUPPORT /* {{{ apc_serialize function */ static int APC_SERIALIZER_NAME(igbinary) ( APC_SERIALIZER_ARGS ) { - if (igbinary_serialize(buf, buf_len, value) == 0) { + if (igbinary_serialize(buf, buf_len, value TSRMLS_CC) == 0) { /* flipped semantics */ return 1; } @@ -527,7 +528,7 @@ static int APC_SERIALIZER_NAME(igbinary) ( APC_SERIALIZER_ARGS ) { /* {{{ apc_unserialize function */ static int APC_UNSERIALIZER_NAME(igbinary) ( APC_UNSERIALIZER_ARGS ) { - if (igbinary_unserialize(buf, buf_len, value) == 0) { + if (igbinary_unserialize(buf, buf_len, value TSRMLS_CC) == 0) { /* flipped semantics */ return 1; } diff --git a/igbinary.h b/igbinary.h index 57060cc8..6ce709bf 100644 --- a/igbinary.h +++ b/igbinary.h @@ -16,7 +16,8 @@ #endif #include "php.h" -#define IGBINARY_VERSION "1.0.2" +#define PHP_IGBINARY_VERSION "1.2.2-dev" +#define IGBINARY_VERSION PHP_IGBINARY_VERSION /** Serialize zval. * Return buffer is allocated by this function with emalloc. diff --git a/package.xml b/package.xml index 827d0036..392fd5f2 100644 --- a/package.xml +++ b/package.xml @@ -1,75 +1,90 @@ - -igbinary - pecl.php.net - igbinary extension - - Igbinary is a drop in replacement for the standard php serializer. Instead of + + igbinary + pecl.php.net + igbinary extension + Igbinary is a drop in replacement for the standard php serializer. Instead of time and space consuming textual representation, igbinary stores php data structures in a compact binary form. Savings are significant when using - memcached or similar memory based storages for serialized data. - - - Oleg Grenrus - - oleg.grenrus@dynamoid.com - yes - - 2009-09-02 - + memcached or similar memory based storages for serialized data. + + Pierre Joye + pajoye + pierre@php.net + yes + + + Teddy Grenman + tricky + teddy.pecl@luuseri.com + yes + + 2011-03-14 + + + 1.1.1 + 1.1.1 + + + stable + stable + + New BSD + +- Initial PECL release + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5.2.0 + + + 1.4.0b1 + + + + igbinary + + + + 2009-09-02 + 1.0.2 1.0.2 - - + + stable stable - - PHP like license - - - Use Z_ADDREF_PP or Z_ADDREF et al. when increasing refcount. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5.2.0 - - - 1.4.0b1 - - - - igbinary - - - + + PHP like license + +- Use Z_ADDREF_PP or Z_ADDREF et al. when increasing refcount. + + +