@@ -326,34 +326,40 @@ PHP_INI_MH(OnUpdateSessionPrefixString)
326
326
#define MEMC_INI_ENTRY (key , default_value , update_fn , gkey ) \
327
327
STD_PHP_INI_ENTRY("memcached."key, default_value, PHP_INI_ALL, update_fn, memc.gkey, zend_php_memcached_globals, php_memcached_globals)
328
328
329
+ #define MEMC_INI_BOOL (key , default_value , update_fn , gkey ) \
330
+ STD_PHP_INI_BOOLEAN("memcached."key, default_value, PHP_INI_ALL, update_fn, memc.gkey, zend_php_memcached_globals, php_memcached_globals)
331
+
329
332
#define MEMC_SESSION_INI_ENTRY (key , default_value , update_fn , gkey ) \
330
333
STD_PHP_INI_ENTRY("memcached.sess_"key, default_value, PHP_INI_ALL, update_fn, session.gkey, zend_php_memcached_globals, php_memcached_globals)
331
334
335
+ #define MEMC_SESSION_INI_BOOL (key , default_value , update_fn , gkey ) \
336
+ STD_PHP_INI_BOOLEAN("memcached.sess_"key, default_value, PHP_INI_ALL, update_fn, session.gkey, zend_php_memcached_globals, php_memcached_globals)
337
+
332
338
333
339
/* {{{ INI entries */
334
340
PHP_INI_BEGIN ()
335
341
336
342
#ifdef HAVE_MEMCACHED_SESSION
337
- MEMC_SESSION_INI_ENTRY ("locking" , "1" , OnUpdateBool , lock_enabled )
343
+ MEMC_SESSION_INI_BOOL ("locking" , "1" , OnUpdateBool , lock_enabled )
338
344
MEMC_SESSION_INI_ENTRY ("lock_wait_min" , "1000" , OnUpdateLongGEZero , lock_wait_min )
339
345
MEMC_SESSION_INI_ENTRY ("lock_wait_max" , "2000" , OnUpdateLongGEZero , lock_wait_max )
340
346
MEMC_SESSION_INI_ENTRY ("lock_retries" , "5" , OnUpdateLong , lock_retries )
341
347
MEMC_SESSION_INI_ENTRY ("lock_expire" , "0" , OnUpdateLongGEZero , lock_expiration )
342
348
#if defined(LIBMEMCACHED_VERSION_HEX ) && LIBMEMCACHED_VERSION_HEX < 0x01000018
343
- MEMC_SESSION_INI_ENTRY ("binary_protocol" , "0" , OnUpdateBool , binary_protocol_enabled )
349
+ MEMC_SESSION_INI_BOOL ("binary_protocol" , "0" , OnUpdateBool , binary_protocol_enabled )
344
350
#else
345
- MEMC_SESSION_INI_ENTRY ("binary_protocol" , "1" , OnUpdateBool , binary_protocol_enabled )
351
+ MEMC_SESSION_INI_BOOL ("binary_protocol" , "1" , OnUpdateBool , binary_protocol_enabled )
346
352
#endif
347
- MEMC_SESSION_INI_ENTRY ("consistent_hash" , "1" , OnUpdateBool , consistent_hash_enabled )
353
+ MEMC_SESSION_INI_BOOL ("consistent_hash" , "1" , OnUpdateBool , consistent_hash_enabled )
348
354
MEMC_SESSION_INI_ENTRY ("number_of_replicas" , "0" , OnUpdateLongGEZero , number_of_replicas )
349
- MEMC_SESSION_INI_ENTRY ("randomize_replica_read" , "0" , OnUpdateBool , randomize_replica_read_enabled )
350
- MEMC_SESSION_INI_ENTRY ("remove_failed_servers" , "0" , OnUpdateBool , remove_failed_servers_enabled )
355
+ MEMC_SESSION_INI_BOOL ("randomize_replica_read" , "0" , OnUpdateBool , randomize_replica_read_enabled )
356
+ MEMC_SESSION_INI_BOOL ("remove_failed_servers" , "0" , OnUpdateBool , remove_failed_servers_enabled )
351
357
MEMC_SESSION_INI_ENTRY ("server_failure_limit" , "0" , OnUpdateLongGEZero , server_failure_limit )
352
358
MEMC_SESSION_INI_ENTRY ("connect_timeout" , "0" , OnUpdateLongGEZero , connect_timeout )
353
359
MEMC_SESSION_INI_ENTRY ("sasl_username" , "" , OnUpdateString , sasl_username )
354
360
MEMC_SESSION_INI_ENTRY ("sasl_password" , "" , OnUpdateString , sasl_password )
361
+ MEMC_SESSION_INI_BOOL ("persistent" , "0" , OnUpdateBool , persistent_enabled )
355
362
MEMC_SESSION_INI_ENTRY ("prefix" , "memc.sess.key." , OnUpdateSessionPrefixString , prefix )
356
- MEMC_SESSION_INI_ENTRY ("persistent" , "0" , OnUpdateBool , persistent_enabled )
357
363
358
364
/* Deprecated */
359
365
STD_PHP_INI_ENTRY ("memcached.sess_lock_wait" , "not set" , PHP_INI_ALL , OnUpdateDeprecatedLockValue , no_effect , zend_php_memcached_globals , php_memcached_globals )
@@ -367,14 +373,16 @@ PHP_INI_BEGIN()
367
373
MEMC_INI_ENTRY ("serializer" , SERIALIZER_DEFAULT_NAME , OnUpdateSerializer , serializer_name )
368
374
MEMC_INI_ENTRY ("store_retry_count" , "2" , OnUpdateLong , store_retry_count )
369
375
370
- MEMC_INI_ENTRY ("default_consistent_hash" , "0" , OnUpdateBool , default_behavior .consistent_hash_enabled )
371
- MEMC_INI_ENTRY ("default_binary_protocol" , "0" , OnUpdateBool , default_behavior .binary_protocol_enabled )
376
+ MEMC_INI_BOOL ("default_consistent_hash" , "0" , OnUpdateBool , default_behavior .consistent_hash_enabled )
377
+ MEMC_INI_BOOL ("default_binary_protocol" , "0" , OnUpdateBool , default_behavior .binary_protocol_enabled )
372
378
MEMC_INI_ENTRY ("default_connect_timeout" , "0" , OnUpdateLongGEZero , default_behavior .connect_timeout )
373
379
374
380
PHP_INI_END ()
375
381
/* }}} */
376
382
383
+ #undef MEMC_INI_BOOL
377
384
#undef MEMC_INI_ENTRY
385
+ #undef MEMC_SESSION_INI_BOOL
378
386
#undef MEMC_SESSION_INI_ENTRY
379
387
380
388
/****************************************
0 commit comments