Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2e190ad

Browse files
yatsukhnenkomichael-grunder
authored andcommitted
Remove odd PHPREDIS_ZVAL_IS_STRICT_FALSE macro
1 parent d4f4074 commit 2e190ad

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

common.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <zend_smart_str.h>
1313
#include <ext/standard/php_smart_string.h>
1414

15-
#define PHPREDIS_ZVAL_IS_STRICT_FALSE(z) (Z_TYPE_P(z) == IS_FALSE)
1615
#define PHPREDIS_GET_OBJECT(class_entry, o) (class_entry *)((char *)o - XtOffsetOf(class_entry, std))
1716
#define PHPREDIS_ZVAL_GET_OBJECT(class_entry, z) PHPREDIS_GET_OBJECT(class_entry, Z_OBJ_P(z))
1817

redis_array.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,16 @@
1919
#include "config.h"
2020
#endif
2121

22-
#include "common.h"
23-
#include "ext/standard/info.h"
24-
#include "php_ini.h"
25-
#include "php_redis.h"
26-
#include <zend_exceptions.h>
27-
2822
#include "library.h"
2923
#include "redis_array.h"
3024
#include "redis_array_impl.h"
3125

26+
#include <ext/standard/info.h>
27+
#include <zend_exceptions.h>
28+
3229
/* Simple macro to detect failure in a RedisArray call */
3330
#define RA_CALL_FAILED(rv, cmd) ( \
34-
PHPREDIS_ZVAL_IS_STRICT_FALSE(rv) || \
31+
(Z_TYPE_P(rv) == IS_FALSE) || \
3532
(Z_TYPE_P(rv) == IS_ARRAY && zend_hash_num_elements(Z_ARRVAL_P(rv)) == 0) || \
3633
(Z_TYPE_P(rv) == IS_LONG && Z_LVAL_P(rv) == 0 && !strcasecmp(cmd, "TYPE")) \
3734
)

0 commit comments

Comments
 (0)