diff --git a/config.w32 b/config.w32 index c368d10..2f20213 100644 --- a/config.w32 +++ b/config.w32 @@ -1,28 +1,27 @@ -// vim: ft=javascript: - -ARG_ENABLE("redis", "whether to enable redis support", "yes"); -ARG_ENABLE("redis-session", "whether to enable sessions", "yes"); -ARG_ENABLE("redis-igbinary", "whether to enable igbinary serializer support", "no"); - -if (PHP_REDIS != "no") { - var sources = "redis.c library.c redis_array.c redis_array_impl.c"; - if (PHP_REDIS_SESSION != "no") { - ADD_SOURCES(configure_module_dirname, "redis_session.c", "redis"); - ADD_EXTENSION_DEP("redis", "session"); - ADD_FLAG("CFLAGS_REDIS", ' /D PHP_SESSION=1 '); - AC_DEFINE("HAVE_REDIS_SESSION", 1); - } - - if (PHP_REDIS_IGBINARY != "no") { - if (CHECK_HEADER_ADD_INCLUDE("igbinary.h", "CFLAGS_REDIS", configure_module_dirname + "\\..\\igbinary")) { - - ADD_EXTENSION_DEP("redis", "igbinary"); - AC_DEFINE("HAVE_REDIS_IGBINARY", 1); - } else { - WARNING("redis igbinary support not enabled"); - } - } - - EXTENSION("redis", sources); -} - +// vim: ft=javascript: + +ARG_ENABLE("redis", "whether to enable redis support", "yes"); +ARG_ENABLE("redis-session", "whether to enable sessions", "yes"); +ARG_ENABLE("redis-igbinary", "whether to enable igbinary serializer support", "no"); + +if (PHP_REDIS != "no") { + var sources = "redis.c library.c redis_array.c redis_array_impl.c"; + if (PHP_REDIS_SESSION != "no") { + ADD_SOURCES(configure_module_dirname, "redis_session.c", "redis"); + ADD_EXTENSION_DEP("redis", "session"); + ADD_FLAG("CFLAGS_REDIS", ' /D PHP_SESSION=1 '); + AC_DEFINE("HAVE_REDIS_SESSION", 1); + } + + if (PHP_REDIS_IGBINARY != "no") { + if (CHECK_HEADER_ADD_INCLUDE("igbinary.h", "CFLAGS_REDIS", configure_module_dirname + "\\..\\igbinary")) { + + ADD_EXTENSION_DEP("redis", "igbinary"); + AC_DEFINE("HAVE_REDIS_IGBINARY", 1); + } else { + WARNING("redis igbinary support not enabled"); + } + } + + EXTENSION("redis", sources); +} \ No newline at end of file diff --git a/redis_array_impl.c b/redis_array_impl.c index dc33667..ba7ae2a 100644 --- a/redis_array_impl.c +++ b/redis_array_impl.c @@ -463,12 +463,14 @@ ra_find_node(RedisArray *ra, const char *key, int key_len, int *out_pos TSRMLS_D } efree(out); } else { + uint64_t h64; + /* hash */ hash = rcrc32(out, out_len); efree(out); /* get position on ring */ - uint64_t h64 = hash; + h64 = hash; h64 *= ra->count; h64 /= 0xffffffff; pos = (int)h64; @@ -565,6 +567,7 @@ ra_index_keys(zval *z_pairs, zval *z_redis TSRMLS_DC) { zval *z_keys, **z_entry_pp; HashPosition pos; MAKE_STD_ZVAL(z_keys); + HashPosition pos; #if PHP_VERSION_ID > 50300 array_init_size(z_keys, zend_hash_num_elements(Z_ARRVAL_P(z_pairs))); #else diff --git a/redis_array_impl.h b/redis_array_impl.h index fa45af8..db8d7af 100644 --- a/redis_array_impl.h +++ b/redis_array_impl.h @@ -2,10 +2,11 @@ #define REDIS_ARRAY_IMPL_H #ifdef PHP_WIN32 -#include "win32/php_stdint.h" +#include #else #include #endif + #include "common.h" #include "redis_array.h"