Created
October 12, 2011 10:04
-
-
Save bobrik/1280799 to your computer and use it in GitHub Desktop.
memcached module for php with backward compatibility hacks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/php_memcached.c b/php_memcached.c | |
index aecdc4f..7ad6c0d 100644 | |
--- a/php_memcached.c | |
+++ b/php_memcached.c | |
@@ -115,17 +115,17 @@ typedef unsigned long int uint32_t; | |
/**************************************** | |
Payload value flags | |
****************************************/ | |
-#define MEMC_VAL_TYPE_MASK 0xf | |
+#define MEMC_VAL_TYPE_MASK 0x2f | |
#define MEMC_VAL_GET_TYPE(flags) ((flags) & MEMC_VAL_TYPE_MASK) | |
#define MEMC_VAL_SET_TYPE(flags, type) ((flags) |= ((type) & MEMC_VAL_TYPE_MASK)) | |
#define MEMC_VAL_IS_STRING 0 | |
-#define MEMC_VAL_IS_LONG 1 | |
-#define MEMC_VAL_IS_DOUBLE 2 | |
-#define MEMC_VAL_IS_BOOL 3 | |
-#define MEMC_VAL_IS_SERIALIZED 4 | |
-#define MEMC_VAL_IS_IGBINARY 5 | |
-#define MEMC_VAL_IS_JSON 6 | |
+#define MEMC_VAL_IS_LONG 4 | |
+#define MEMC_VAL_IS_DOUBLE 8 | |
+#define MEMC_VAL_IS_BOOL 32 | |
+#define MEMC_VAL_IS_SERIALIZED 1 | |
+#define MEMC_VAL_IS_IGBINARY 100 | |
+#define MEMC_VAL_IS_JSON 101 | |
#define MEMC_VAL_COMPRESSED (1<<4) | |
#define MEMC_VAL_COMPRESSION_ZLIB (1<<5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
пока тут полежит, как можно будет наконец зафоркать оригинальный репозиторий, так всё пойдёт туда.
компрессия несовместима пока что.