Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding TS build fixes #3

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
18 changes: 18 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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": "[email protected]"
}
]
}
10 changes: 7 additions & 3 deletions config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
7 changes: 4 additions & 3 deletions igbinary.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion igbinary.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
149 changes: 82 additions & 67 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,75 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<package packagerversion="1.4.11" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
http://pear.php.net/dtd/tasks-1.0.xsd
http://pear.php.net/dtd/package-2.0
http://pear.php.net/dtd/package-2.0.xsd">
<name>igbinary</name>
<channel>pecl.php.net</channel> <!-- doesn't allow empty channel -->
<summary>igbinary extension</summary>
<description>
Igbinary is a drop in replacement for the standard php serializer. Instead of
<package packagerversion="1.9.1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>igbinary</name>
<channel>pecl.php.net</channel>
<summary>igbinary extension</summary>
<description>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.
</description>
<lead>
<name>Oleg Grenrus</name>
<user></user>
<email>[email protected]</email>
<active>yes</active>
</lead>
<date>2009-09-02</date>
<version>
memcached or similar memory based storages for serialized data.</description>
<lead>
<name>Pierre Joye</name>
<user>pajoye</user>
<email>[email protected]</email>
<active>yes</active>
</lead>
<lead>
<name>Teddy Grenman</name>
<user>tricky</user>
<email>[email protected]</email>
<active>yes</active>
</lead>
<date>2011-03-14</date>
<time>12:32:48</time>
<version>
<release>1.1.1</release>
<api>1.1.1</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://opensource.dynamoid.com/#license">New BSD</license>
<notes>
- Initial PECL release
</notes>
<contents>
<dir name="/">
<file md5sum="25a40e6248e3c0ec643cf9aec85de701" name="config.m4" role="src" />
<file md5sum="2f4a0be3f4bde67e2d1d520950ef114f" name="config.w32" role="src" />
<file md5sum="2aee655295cd659163750dd660256890" name="hash.h" role="src" />
<file md5sum="623bdc626d86470dc56e4d68eabf7479" name="hash_function.c" role="src" />
<file md5sum="5b76399c6903280d52778fae36b3912f" name="hash_function.h" role="src" />
<file md5sum="328097620a5d4ec1a14367b09b43b1db" name="hash_si.c" role="src" />
<file md5sum="6af207bdb08d0a847a8397852d75e191" name="igbinary.c" role="src" />
<file md5sum="c816c8c774e6d0bfa0b2d68064884da7" name="igbinary.h" role="src" />
<file md5sum="edff8c2c04fa84e3d72ce4a9ac85acd1" name="php_igbinary.h" role="src" />
<file md5sum="85cc0ae7373ee9be2674a459c82d6527" name="ig_win32.h" role="src" />
<file md5sum="c253cad5fe60301399f0cfe4aa8ddd77" name="apc_serializer.h" role="src" />
<file md5sum="0876e1bfd187714fa2fb7f846c832e27" name="igbinary.php" role="doc" />
<file md5sum="ec6d65122bf896f39b07b1fa9702b8c6" name="igbinary.php.ini" role="doc" />
<file md5sum="f689b3371abc4e94adfe44890e1c8bf5" name="tags.sh" role="doc" />
<file md5sum="428aab84dcb89f8b36cae8676dbab1c2" name="igbinary.spec" role="doc" />
<file md5sum="952518c6ca2548882e413d0385fa9566" name="ChangeLog" role="doc" />
<file md5sum="1baee8825230aa507ac1a00c3c501537" name="COPYING" role="doc" />
<file md5sum="90c51289ecb0de4423d1c93d8f431819" name="CREDITS" role="doc" />
<file md5sum="d41d8cd98f00b204e9800998ecf8427e" name="EXPERIMENTAL" role="doc" />
<file md5sum="4636dfb4473992ff6b06e2d1b7bb7631" name="README" role="doc" />
<file md5sum="7b31de8dd5f56c1648685cf4b968346e" name="NEWS" role="doc" />
</dir>
</contents>
<dependencies>
<required>
<php>
<min>5.2.0</min>
</php>
<pearinstaller>
<min>1.4.0b1</min>
</pearinstaller>
</required>
</dependencies>
<providesextension>igbinary</providesextension>
<extsrcrelease />
<changelog>
<release>
<date>2009-09-02</date>
<version>
<release>1.0.2</release>
<api>1.0.2</api>
</version>
<stability>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://opensource.dynamoid.com/#license">PHP like license</license>
<notes>
- Use Z_ADDREF_PP or Z_ADDREF et al. when increasing refcount.
</notes>
<contents>
<dir name="/">
<file name="config.m4" role="src" />
<file name="config.w32" role="src" />

<file name="hash.h" role="src" />
<file name="hash_function.c" role="src" />
<file name="hash_function.h" role="src" />
<file name="hash_si.c" role="src" />
<file name="igbinary.c" role="src" />
<file name="igbinary.h" role="src" />
<file name="php_igbinary.h" role="src" />
<file name="ig_win32.h" role="src" />

<file name="igbinary.php" role="doc" />
<file name="igbinary.php.ini" role="doc" />
<file name="tags.sh" role="doc" />
<file name="igbinary.spec" role="doc" />

<file name="ChangeLog" role="doc" />
<file name="COPYING" role="doc" />
<file name="CREDITS" role="doc" />
<file name="EXPERIMENTAL" role="doc" />
<file name="README" role="doc" />
<file name="NEWS" role="doc" />
</dir>
</contents>
<dependencies>
<required>
<php>
<min>5.2.0</min>
</php>
<pearinstaller>
<min>1.4.0b1</min>
</pearinstaller>
</required>
</dependencies>
<providesextension>igbinary</providesextension>
<extsrcrelease>
</extsrcrelease>

</stability>
<license uri="http://opensource.dynamoid.com/#license">PHP like license</license>
<notes>
- Use Z_ADDREF_PP or Z_ADDREF et al. when increasing refcount.
</notes>
</release>
</changelog>
</package>