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-02-24 22:43:44 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2019-02-24 22:43:44 +0300
commitaa9c44cc64d71ac87b8430f055a1b7b98cdc56bf (patch)
tree236789dd5fac18411743602a3a11272e73e51938
parent6f70bcda0006d598846658d98c656c2964f1e476 (diff)
Fix review comments
-rw-r--r--common.h16
-rw-r--r--library.c18
2 files changed, 17 insertions, 17 deletions
diff --git a/common.h b/common.h
index bd3d6965..31bf3b0f 100644
--- a/common.h
+++ b/common.h
@@ -68,22 +68,6 @@ zend_string_realloc(zend_string *s, size_t len, int persistent)
return zstr;
}
-#define strpprintf zend_strpprintf
-
-static zend_string *
-zend_strpprintf(size_t max_len, const char *format, ...)
-{
- va_list ap;
- zend_string *zstr;
-
- va_start(ap, format);
- zstr = ecalloc(1, sizeof(*zstr));
- ZSTR_LEN(zstr) = vspprintf(&ZSTR_VAL(zstr), max_len, format, ap);
- zstr->gc = 0x11;
- va_end(ap);
- return zstr;
-}
-
#define zend_string_copy(s) zend_string_init(ZSTR_VAL(s), ZSTR_LEN(s), 0)
#define zend_string_equal_val(s1, s2) !memcmp(ZSTR_VAL(s1), ZSTR_VAL(s2), ZSTR_LEN(s1))
diff --git a/library.c b/library.c
index bd46dade..10ddae74 100644
--- a/library.c
+++ b/library.c
@@ -56,6 +56,23 @@
int (*_add_assoc_zval_ex)(zval *, const char *, uint, zval *) = &add_assoc_zval_ex;
void (*_php_var_serialize)(smart_str *, zval **, php_serialize_data_t * TSRMLS_DC) = &php_var_serialize;
int (*_php_var_unserialize)(zval **, const unsigned char **, const unsigned char *, php_unserialize_data_t * TSRMLS_DC) = &php_var_unserialize;
+
+#define strpprintf zend_strpprintf
+
+static zend_string *
+zend_strpprintf(size_t max_len, const char *format, ...)
+{
+ va_list ap;
+ zend_string *zstr;
+
+ va_start(ap, format);
+ zstr = ecalloc(1, sizeof(*zstr));
+ ZSTR_LEN(zstr) = vspprintf(&ZSTR_VAL(zstr), max_len, format, ap);
+ zstr->gc = 0x11;
+ va_end(ap);
+ return zstr;
+}
+
#endif
extern zend_class_entry *redis_ce;
@@ -75,7 +92,6 @@ redis_sock_get_connection_pool(RedisSock *redis_sock TSRMLS_DC)
le->type = le_redis_pconnect;
le->ptr = p;
zend_hash_str_update_mem(&EG(persistent_list), ZSTR_VAL(persistent_id), ZSTR_LEN(persistent_id), le, sizeof(*le));
- p->nb_active = 0;
}
zend_string_release(persistent_id);
return le->ptr;