Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael-grunder <michael.grunder@gmail.com>2019-03-21 06:23:54 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2019-03-23 17:55:43 +0300
commit52bae8abb951605d8dcbd4151a90b845fd05068b (patch)
tree434cf367903b360447d6b05c2dcc4216b68b412a /redis.c
parent545250f30b88ab1adb644d7ec8fb64bc88f90e32 (diff)
Hook msgpack into available serializers output
Diffstat (limited to 'redis.c')
-rw-r--r--redis.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/redis.c b/redis.c
index 65e6a9d9..6d32dad5 100644
--- a/redis.c
+++ b/redis.c
@@ -795,6 +795,22 @@ PHP_MSHUTDOWN_FUNCTION(redis)
return SUCCESS;
}
+static const char *get_available_serializers(void) {
+#ifdef HAVE_REDIS_IGBINARY
+ #ifdef HAVE_REDIS_MSGPACK
+ return "php, igbinary, msgpack";
+ #else
+ return "php, igbinary";
+ #endif
+#else
+ #ifdef HAVE_REDIS_MSGPACK
+ return "php, msgpack";
+ #else
+ return "php";
+ #endif
+#endif
+}
+
/**
* PHP_MINFO_FUNCTION
*/
@@ -806,11 +822,7 @@ PHP_MINFO_FUNCTION(redis)
#ifdef GIT_REVISION
php_info_print_table_row(2, "Git revision", "$Id: " GIT_REVISION " $");
#endif
-#ifdef HAVE_REDIS_IGBINARY
- php_info_print_table_row(2, "Available serializers", "php, igbinary");
-#else
- php_info_print_table_row(2, "Available serializers", "php");
-#endif
+ php_info_print_table_row(2, "Available serializers", get_available_serializers());
#ifdef HAVE_REDIS_LZF
php_info_print_table_row(2, "Available compression", "lzf");
#endif