From 5b5bfd6be48de4601d508fa5b8a7a572dda6b8bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sun, 14 Feb 2021 15:21:24 +0100 Subject: Generate class entries from stubs for phar, posix, pspell, readline, reflection, session, shmop Closes GH-6692 --- ext/pspell/pspell.c | 9 ++------- ext/pspell/pspell.stub.php | 4 +++- ext/pspell/pspell_arginfo.h | 25 ++++++++++++++++++++++++- 3 files changed, 29 insertions(+), 9 deletions(-) (limited to 'ext/pspell') diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c index 8975519955..b965a22f61 100644 --- a/ext/pspell/pspell.c +++ b/ext/pspell/pspell.c @@ -150,10 +150,7 @@ static void php_pspell_config_object_free(zend_object *zobj) { /* {{{ PHP_MINIT_FUNCTION */ static PHP_MINIT_FUNCTION(pspell) { - zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "PSpell", class_PSpell_methods); - php_pspell_ce = zend_register_internal_class(&ce); - php_pspell_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES; + php_pspell_ce = register_class_PSpell(); php_pspell_ce->create_object = php_pspell_object_create; php_pspell_ce->serialize = zend_class_serialize_deny; php_pspell_ce->unserialize = zend_class_unserialize_deny; @@ -164,9 +161,7 @@ static PHP_MINIT_FUNCTION(pspell) php_pspell_handlers.get_constructor = php_pspell_object_get_constructor; php_pspell_handlers.offset = XtOffsetOf(php_pspell_object, std); - INIT_CLASS_ENTRY(ce, "PSpellConfig", class_PSpellConfig_methods); - php_pspell_config_ce = zend_register_internal_class(&ce); - php_pspell_config_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES; + php_pspell_config_ce = register_class_PSpellConfig(); php_pspell_config_ce->create_object = php_pspell_config_object_create; php_pspell_config_ce->serialize = zend_class_serialize_deny; php_pspell_config_ce->unserialize = zend_class_unserialize_deny; diff --git a/ext/pspell/pspell.stub.php b/ext/pspell/pspell.stub.php index a10de4b9f9..40a2a73097 100644 --- a/ext/pspell/pspell.stub.php +++ b/ext/pspell/pspell.stub.php @@ -1,8 +1,10 @@ ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES; + + return class_entry; +} + +zend_class_entry *register_class_PSpellConfig() +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "PSpellConfig", class_PSpellConfig_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES; + + return class_entry; +} + -- cgit v1.2.1