diff options
author | michael-grunder <michael.grunder@gmail.com> | 2019-03-20 02:06:53 +0300 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2019-03-20 02:06:53 +0300 |
commit | 6ebb36ce65860d66ed9499bf237ce88e93ff770e (patch) | |
tree | 9332b9386dd7c6b8f9096d6fed49eb374de8936f /library.c | |
parent | a013d2459273b33c6955e1bd356d0be0bf555772 (diff) |
Get rid of ifdefs
Diffstat (limited to 'library.c')
-rw-r--r-- | library.c | 35 |
1 files changed, 0 insertions, 35 deletions
@@ -38,41 +38,6 @@ #include <sys/socket.h> /* SO_KEEPALIVE */ #else #include <winsock.h> - - # if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION <= 4 - /* This proto is available from 5.5 on only */ - PHP_REDIS_API int usleep(unsigned int useconds); - # endif -#endif - -#if (PHP_MAJOR_VERSION < 7) - int (*_add_next_index_string)(zval *, const char *, int) = &add_next_index_string; - int (*_add_next_index_stringl)(zval *, const char *, uint, int) = &add_next_index_stringl; - int (*_add_assoc_bool_ex)(zval *, const char *, uint, int) = &add_assoc_bool_ex; - int (*_add_assoc_long_ex)(zval *, const char *, uint, long) = &add_assoc_long_ex; - int (*_add_assoc_double_ex)(zval *, const char *, uint, double) = &add_assoc_double_ex; - int (*_add_assoc_string_ex)(zval *, const char *, uint, char *, int) = &add_assoc_string_ex; - int (*_add_assoc_stringl_ex)(zval *, const char *, uint, char *, uint, int) = &add_assoc_stringl_ex; - 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; |