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

Skip to content

Commit a9857d6

Browse files
committed
Use static declarations for spl_ce_RuntimeException decl
This is consistent with the PDO extension, which also resolves the RuntimeException class entry on-demand. Without a static decl, this can conflict with the extern decls in spl_exceptions.h and cause a "missing symbol" error for other extensions depending on those SPL decls. This commit also makes the spl_rte_ce decl in redis_cluster.c static for consistency, although that symbol does not currently conflict with anything in SPL.
1 parent 2d6bf93 commit a9857d6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

redis.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ extern zend_class_entry *redis_cluster_ce;
6060
zend_class_entry *redis_ce;
6161
zend_class_entry *redis_exception_ce;
6262
extern zend_class_entry *redis_cluster_exception_ce;
63-
zend_class_entry *spl_ce_RuntimeException = NULL;
63+
static zend_class_entry *spl_ce_RuntimeException = NULL;
6464

6565
extern zend_function_entry redis_array_functions[];
6666
extern zend_function_entry redis_cluster_functions[];

redis_cluster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ zend_class_entry *redis_cluster_ce;
3636

3737
/* Exception handler */
3838
zend_class_entry *redis_cluster_exception_ce;
39-
zend_class_entry *spl_rte_ce = NULL;
39+
static zend_class_entry *spl_rte_ce = NULL;
4040

4141
/* Argument info for HSCAN, SSCAN, HSCAN */
4242
ZEND_BEGIN_ARG_INFO_EX(arginfo_kscan_cl, 0, 0, 2)

0 commit comments

Comments
 (0)