Skip to content
This repository was archived by the owner on Jun 7, 2020. It is now read-only.

Commit 3faa173

Browse files
committed
Merge in fix for libmemcached-0.38.
1 parent 2090367 commit 3faa173

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

php_memcached.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,8 +2065,14 @@ static int php_memc_set_option(php_memc_t *i_obj, long option, zval *value TSRML
20652065
* (non-weighted) case. We have to clean up ourselves.
20662066
*/
20672067
if (!Z_LVAL_P(value)) {
2068+
#if defined(LIBMEMCACHED_VERSION_HEX) && LIBMEMCACHED_VERSION_HEX > 0x00037000
2069+
(void)memcached_behavior_set_key_hash(m_obj->memc, MEMCACHED_HASH_DEFAULT);
2070+
(void)memcached_behavior_set_distribution_hash(m_obj->memc, MEMCACHED_HASH_DEFAULT);
2071+
(void)memcached_behavior_set_distribution(m_obj->memc, MEMCACHED_DISTRIBUTION_MODULA);
2072+
#else
20682073
m_obj->memc->hash = 0;
20692074
m_obj->memc->distribution = 0;
2075+
#endif
20702076
}
20712077
break;
20722078

0 commit comments

Comments
 (0)