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:
authorPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2019-05-12 15:30:47 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2019-05-12 15:30:47 +0300
commit98bd2886c391d01607e1c4d1d06faeebbd4ed2c3 (patch)
tree5eb5324e37c44c928af0b9294726ad0933e43fe9 /common.h
parent8a45d18c383647e573d5fd2b3617eb402a6bb6a5 (diff)
JSON serializer
Diffstat (limited to 'common.h')
-rw-r--r--common.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/common.h b/common.h
index c0e9182c..2208cc48 100644
--- a/common.h
+++ b/common.h
@@ -85,10 +85,13 @@ typedef enum _PUBSUB_TYPE {
#define REDIS_FAILOVER_DISTRIBUTE 2
#define REDIS_FAILOVER_DISTRIBUTE_SLAVES 3
/* serializers */
-#define REDIS_SERIALIZER_NONE 0
-#define REDIS_SERIALIZER_PHP 1
-#define REDIS_SERIALIZER_IGBINARY 2
-#define REDIS_SERIALIZER_MSGPACK 3
+typedef enum {
+ REDIS_SERIALIZER_NONE,
+ REDIS_SERIALIZER_PHP,
+ REDIS_SERIALIZER_IGBINARY,
+ REDIS_SERIALIZER_MSGPACK,
+ REDIS_SERIALIZER_JSON
+} redis_serializer;
/* compression */
#define REDIS_COMPRESSION_NONE 0
#define REDIS_COMPRESSION_LZF 1
@@ -252,7 +255,7 @@ typedef struct {
int watching;
zend_string *persistent_id;
- int serializer;
+ redis_serializer serializer;
int compression;
long dbNumber;