diff options
author | Remi Collet <remi@remirepo.net> | 2022-07-04 15:27:20 +0300 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2022-07-18 14:45:45 +0300 |
commit | 3675f442e413bd864c12787c3b383b110ed26963 (patch) | |
tree | eb67a42747b288260f88fd87db18dc36f42d7ddb /redis_cluster.c | |
parent | 0f1ca0ccf815352d79e716dac49b854491ecc994 (diff) |
mark auth param as sensitive for PHP 8.2
refactor MINIT (split in each class sources file)
use @generate-class-entries in stub files
add RedisException and RedisClusterException in stub files
Diffstat (limited to 'redis_cluster.c')
-rw-r--r-- | redis_cluster.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/redis_cluster.c b/redis_cluster.c index 5634560f..e3451899 100644 --- a/redis_cluster.c +++ b/redis_cluster.c @@ -38,12 +38,25 @@ zend_class_entry *redis_cluster_exception_ce; #if PHP_VERSION_ID < 80000 #include "redis_cluster_legacy_arginfo.h" #else +#include "zend_attributes.h" #include "redis_cluster_arginfo.h" #endif -extern const zend_function_entry *redis_cluster_get_methods(void) +PHP_MINIT_FUNCTION(redis_cluster) { - return class_RedisCluster_methods; + zend_class_entry *exception_ce = NULL; + + redis_cluster_ce = register_class_RedisCluster(); + redis_cluster_ce->create_object = create_cluster_context; + + /* Base Exception class */ + exception_ce = zend_hash_str_find_ptr(CG(class_table), "RuntimeException", sizeof("RuntimeException") - 1); + if (exception_ce == NULL) { + exception_ce = zend_exception_get_default(); + } + redis_cluster_exception_ce = register_class_RedisClusterException(exception_ce); + + return SUCCESS; } /* Handlers for RedisCluster */ |