mirror of
https://github.com/phpredis/phpredis.git
synced 2026-06-19 07:35:31 +00:00
2c5ef19257
* Introduce a new `RedisCmd` struct to dynamically append RESP arguments such that we don't have to precalculate the number of arguments the command will have up front. Additionally the new `RedisCmd allows both a `void *` context pointer but also can attach a `void (*ctx_dtor)(void*)` destructor so we are still able to clean up any allocated context when commands fail. This moves the context cleanup out of every individual reply handler and into the generic processing wrappers. * Create a small group of `resp_str` helper functions for lower level concatination of RESP protocol data over the wire. * Lots of small modernization of the codebase such as using `zend_string*` instead of (`char *`, `size_t`) pairs. * Greatly simplify `crosslot` handling logic
28 lines
980 B
JavaScript
28 lines
980 B
JavaScript
// vim: ft=javascript:
|
|
|
|
ARG_ENABLE("redis", "whether to enable redis support", "no");
|
|
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 redis_commands.c redis_cmd.c library.c redis_session.c redis_array.c redis_array_impl.c redis_cluster.c cluster_library.c redis_sentinel.c sentinel_library.c backoff.c";
|
|
if (PHP_REDIS_SESSION != "no") {
|
|
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);
|
|
|
|
}
|
|
|