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>2021-04-14 12:55:38 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2021-04-14 12:55:38 +0300
commit6aa9c0899cab2210e9340bd710ee81db72d76d40 (patch)
tree07787777257045ea1dbce7a5673d5731464d31ab
parent446ceb2a51a256fee07cf6eeab7ef065b51bf497 (diff)
Add PHPREDIS_CTX_PTR magic value
-rw-r--r--README.markdown2
-rw-r--r--common.h1
-rw-r--r--redis_commands.c6
3 files changed, 5 insertions, 4 deletions
diff --git a/README.markdown b/README.markdown
index c30fd2d3..4840f4cd 100644
--- a/README.markdown
+++ b/README.markdown
@@ -1,6 +1,6 @@
# PhpRedis
-[![Build Status](https://travis-ci.org/phpredis/phpredis.svg?branch=develop)](https://travis-ci.org/phpredis/phpredis)
+[![Build Status](https://travis-ci.com/phpredis/phpredis.svg?branch=develop)](https://travis-ci.com/phpredis/phpredis)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/13205/badge.svg)](https://scan.coverity.com/projects/phpredis-phpredis)
[![PHP version from Travis config](https://img.shields.io/travis/php-v/phpredis/phpredis/develop)](https://img.shields.io/travis/php-v/phpredis/phpredis/develop)
diff --git a/common.h b/common.h
index fd11bf4e..e4808969 100644
--- a/common.h
+++ b/common.h
@@ -4,6 +4,7 @@
#ifndef REDIS_COMMON_H
#define REDIS_COMMON_H
+#define PHPREDIS_CTX_PTR ((void *)0xDEADC0DE)
#define PHPREDIS_NOTUSED(v) ((void)v)
#include "zend_llist.h"
diff --git a/redis_commands.c b/redis_commands.c
index 991ea1ff..06e352cc 100644
--- a/redis_commands.c
+++ b/redis_commands.c
@@ -667,7 +667,7 @@ redis_zdiff_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
if (withscores) {
REDIS_CMD_APPEND_SSTR_STATIC(&cmdstr, "WITHSCORES");
- *ctx = redis_sock;
+ *ctx = PHPREDIS_CTX_PTR;
}
*cmd = cmdstr.c;
@@ -785,7 +785,7 @@ redis_zinterunion_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
if (withscores) {
REDIS_CMD_APPEND_SSTR_STATIC(&cmdstr, "WITHSCORES");
- *ctx = redis_sock;
+ *ctx = PHPREDIS_CTX_PTR;
}
*cmd = cmdstr.c;
@@ -1621,7 +1621,7 @@ int redis_set_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
redis_cmd_append_sstr(&cmdstr, "KEEPTTL", 7);
if (get) {
REDIS_CMD_APPEND_SSTR_STATIC(&cmdstr, "GET");
- *ctx = redis_sock;
+ *ctx = PHPREDIS_CTX_PTR;
}
/* Push command and length to the caller */