summaryrefslogtreecommitdiff
path: root/ext/zlib
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2021-02-17 13:42:42 +0100
committerMáté Kocsis <kocsismate@woohoolabs.com>2021-02-22 15:24:03 +0100
commit4c6533c257cfabd5dd78988bb277f410b2778140 (patch)
tree81f77c32eb3daf8012427417801b9a66afce8f41 /ext/zlib
parentd03be8bf8613571965ec5c033f6dcd607346352a (diff)
downloadphp-git-4c6533c257cfabd5dd78988bb277f410b2778140.tar.gz
Generate class entries from stubs for com, standard, xmlreader, xmlwriter, xsl, zip, Zend
Closes GH-6706
Diffstat (limited to 'ext/zlib')
-rw-r--r--ext/zlib/zlib.c10
-rw-r--r--ext/zlib/zlib.stub.php4
-rw-r--r--ext/zlib/zlib_arginfo.h24
3 files changed, 28 insertions, 10 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 628f04f2f4..02fb4dd207 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -1337,10 +1337,7 @@ static PHP_MINIT_FUNCTION(zlib)
php_output_handler_conflict_register(ZEND_STRL("ob_gzhandler"), php_zlib_output_conflict_check);
php_output_handler_conflict_register(ZEND_STRL(PHP_ZLIB_OUTPUT_HANDLER_NAME), php_zlib_output_conflict_check);
- zend_class_entry inflate_ce;
- INIT_CLASS_ENTRY(inflate_ce, "InflateContext", class_InflateContext_methods);
- inflate_context_ce = zend_register_internal_class(&inflate_ce);
- inflate_context_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+ inflate_context_ce = register_class_InflateContext();
inflate_context_ce->create_object = inflate_context_create_object;
inflate_context_ce->serialize = zend_class_serialize_deny;
inflate_context_ce->unserialize = zend_class_unserialize_deny;
@@ -1352,10 +1349,7 @@ static PHP_MINIT_FUNCTION(zlib)
inflate_context_object_handlers.clone_obj = NULL;
inflate_context_object_handlers.compare = zend_objects_not_comparable;
- zend_class_entry deflate_ce;
- INIT_CLASS_ENTRY(deflate_ce, "DeflateContext", class_DeflateContext_methods);
- deflate_context_ce = zend_register_internal_class(&deflate_ce);
- deflate_context_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+ deflate_context_ce = register_class_DeflateContext();
deflate_context_ce->create_object = deflate_context_create_object;
deflate_context_ce->serialize = zend_class_serialize_deny;
deflate_context_ce->unserialize = zend_class_unserialize_deny;
diff --git a/ext/zlib/zlib.stub.php b/ext/zlib/zlib.stub.php
index c047a53541..1aaafcdce2 100644
--- a/ext/zlib/zlib.stub.php
+++ b/ext/zlib/zlib.stub.php
@@ -1,11 +1,13 @@
<?php
-/** @generate-function-entries */
+/** @generate-class-entries */
+/** @strict-properties */
final class InflateContext
{
}
+/** @strict-properties */
final class DeflateContext
{
}
diff --git a/ext/zlib/zlib_arginfo.h b/ext/zlib/zlib_arginfo.h
index 9f5129feb0..e0ff0e16e9 100644
--- a/ext/zlib/zlib_arginfo.h
+++ b/ext/zlib/zlib_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 5862b97739c885589779f8ba3d13b4e390d72811 */
+ * Stub hash: 1aa5f9d6d062280f6148f3e72ceeaca81fb3037e */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ob_gzhandler, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
@@ -207,3 +207,25 @@ static const zend_function_entry class_InflateContext_methods[] = {
static const zend_function_entry class_DeflateContext_methods[] = {
ZEND_FE_END
};
+
+static zend_class_entry *register_class_InflateContext(void)
+{
+ zend_class_entry ce, *class_entry;
+
+ INIT_CLASS_ENTRY(ce, "InflateContext", class_InflateContext_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;
+}
+
+static zend_class_entry *register_class_DeflateContext(void)
+{
+ zend_class_entry ce, *class_entry;
+
+ INIT_CLASS_ENTRY(ce, "DeflateContext", class_DeflateContext_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;
+}