diff options
author | Remi Collet <fedora@famillecollet.com> | 2012-06-10 07:06:04 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2012-06-10 07:06:04 +0200 |
commit | 060ccef5bee3a846078e6f2ba7d7b52145ebc54b (patch) | |
tree | b2e01c7cd8585f185f53d146496c132ee967dbf4 /memcache-php54.patch |
repo reorg
Diffstat (limited to 'memcache-php54.patch')
-rw-r--r-- | memcache-php54.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/memcache-php54.patch b/memcache-php54.patch new file mode 100644 index 0000000..be9f200 --- /dev/null +++ b/memcache-php54.patch @@ -0,0 +1,51 @@ +diff -up memcache-3.0.6/memcache.c.orig memcache-3.0.6/memcache.c +--- memcache-3.0.6/memcache.c.orig 2011-11-13 10:54:04.230073555 +0100 ++++ memcache-3.0.6/memcache.c 2011-11-13 10:55:41.867315825 +0100 +@@ -718,7 +718,11 @@ mmc_t *mmc_find_persistent(const char *h + mmc_server_free(mmc TSRMLS_CC); + mmc = NULL; + } else { ++#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5) ++ zend_list_insert(mmc, le_memcache_server TSRMLS_CC); ++#else + zend_list_insert(mmc, le_memcache_server); ++#endif + } + } + else if (le->type != le_memcache_server || le->ptr == NULL) { +@@ -735,7 +739,11 @@ mmc_t *mmc_find_persistent(const char *h + mmc = NULL; + } + else { ++#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5) ++ zend_list_insert(mmc, le_memcache_server TSRMLS_CC); ++#else + zend_list_insert(mmc, le_memcache_server); ++#endif + } + } + else { +@@ -775,7 +783,11 @@ static mmc_t *php_mmc_pool_addserver( + if (zend_hash_find(Z_OBJPROP_P(mmc_object), "connection", sizeof("connection"), (void **)&connection) == FAILURE) { + pool = mmc_pool_new(TSRMLS_C); + pool->failure_callback = &php_mmc_failure_callback; ++#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5) ++ list_id = zend_list_insert(pool, le_memcache_pool TSRMLS_CC); ++#else + list_id = zend_list_insert(pool, le_memcache_pool); ++#endif + add_property_resource(mmc_object, "connection", list_id); + } + else { +@@ -836,7 +848,11 @@ static void php_mmc_connect(INTERNAL_FUN + int list_id; + mmc_pool_t *pool = mmc_pool_new(TSRMLS_C); + pool->failure_callback = &php_mmc_failure_callback; ++#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5) ++ list_id = zend_list_insert(pool, le_memcache_pool TSRMLS_CC); ++#else + list_id = zend_list_insert(pool, le_memcache_pool); ++#endif + mmc_object = return_value; + object_init_ex(mmc_object, memcache_ce); + add_property_resource(mmc_object, "connection", list_id); |