diff options
author | michael-grunder <michael.grunder@gmail.com> | 2019-03-21 06:23:54 +0300 |
---|---|---|
committer | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2019-03-23 17:55:43 +0300 |
commit | 52bae8abb951605d8dcbd4151a90b845fd05068b (patch) | |
tree | 434cf367903b360447d6b05c2dcc4216b68b412a /redis.c | |
parent | 545250f30b88ab1adb644d7ec8fb64bc88f90e32 (diff) |
Hook msgpack into available serializers output
Diffstat (limited to 'redis.c')
-rw-r--r-- | redis.c | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -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 |