diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index c333a4d3a4b82..93fba39c17f64 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -279,9 +279,6 @@ static PHP_GSHUTDOWN_FUNCTION(oci) PHP_MINIT_FUNCTION(oci) { - zend_class_entry oci_lob_class_entry; - zend_class_entry oci_coll_class_entry; - REGISTER_INI_ENTRIES(); le_statement = zend_register_list_destructors_ex(php_oci_statement_list_dtor, NULL, "oci8 statement", module_number); @@ -291,11 +288,8 @@ PHP_MINIT_FUNCTION(oci) le_descriptor = zend_register_list_destructors_ex(php_oci_descriptor_list_dtor, NULL, "oci8 descriptor", module_number); le_collection = zend_register_list_destructors_ex(php_oci_collection_list_dtor, NULL, "oci8 collection", module_number); - INIT_CLASS_ENTRY(oci_lob_class_entry, "OCILob", class_OCILob_methods); - INIT_CLASS_ENTRY(oci_coll_class_entry, "OCICollection", class_OCICollection_methods); - - oci_lob_class_entry_ptr = zend_register_internal_class(&oci_lob_class_entry); - oci_coll_class_entry_ptr = zend_register_internal_class(&oci_coll_class_entry); + oci_lob_class_entry_ptr = register_class_OCILob(); + oci_coll_class_entry_ptr = register_class_OCICollection(); /* thies@thieso.net 990203 i do not think that we will need all of them - just in here for completeness for now! */ REGISTER_LONG_CONSTANT("OCI_DEFAULT",OCI_DEFAULT, CONST_CS | CONST_PERSISTENT); diff --git a/ext/oci8/oci8.stub.php b/ext/oci8/oci8.stub.php index ee8ea98b5430b..b7d47d5dc9597 100644 --- a/ext/oci8/oci8.stub.php +++ b/ext/oci8/oci8.stub.php @@ -1,6 +1,6 @@ ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES; + php_openssl_certificate_ce = register_class_OpenSSLCertificate(); php_openssl_certificate_ce->create_object = php_openssl_certificate_create_object; php_openssl_certificate_ce->serialize = zend_class_serialize_deny; php_openssl_certificate_ce->unserialize = zend_class_unserialize_deny; @@ -1115,10 +1112,7 @@ PHP_MINIT_FUNCTION(openssl) php_openssl_certificate_object_handlers.get_constructor = php_openssl_certificate_get_constructor; php_openssl_certificate_object_handlers.clone_obj = NULL; - zend_class_entry csr_ce; - INIT_CLASS_ENTRY(csr_ce, "OpenSSLCertificateSigningRequest", class_OpenSSLCertificateSigningRequest_methods); - php_openssl_request_ce = zend_register_internal_class(&csr_ce); - php_openssl_request_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES; + php_openssl_request_ce = register_class_OpenSSLCertificateSigningRequest(); php_openssl_request_ce->create_object = php_openssl_request_create_object; php_openssl_request_ce->serialize = zend_class_serialize_deny; php_openssl_request_ce->unserialize = zend_class_unserialize_deny; @@ -1129,10 +1123,7 @@ PHP_MINIT_FUNCTION(openssl) php_openssl_request_object_handlers.get_constructor = php_openssl_request_get_constructor; php_openssl_request_object_handlers.clone_obj = NULL; - zend_class_entry key_ce; - INIT_CLASS_ENTRY(key_ce, "OpenSSLAsymmetricKey", class_OpenSSLAsymmetricKey_methods); - php_openssl_pkey_ce = zend_register_internal_class(&key_ce); - php_openssl_pkey_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES; + php_openssl_pkey_ce = register_class_OpenSSLAsymmetricKey(); php_openssl_pkey_ce->create_object = php_openssl_pkey_create_object; php_openssl_pkey_ce->serialize = zend_class_serialize_deny; php_openssl_pkey_ce->unserialize = zend_class_unserialize_deny; diff --git a/ext/openssl/openssl.stub.php b/ext/openssl/openssl.stub.php index e77f4e4043a78..db49af3126298 100644 --- a/ext/openssl/openssl.stub.php +++ b/ext/openssl/openssl.stub.php @@ -1,15 +1,18 @@ ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES; + + return class_entry; +} + +zend_class_entry *register_class_OpenSSLCertificateSigningRequest() +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "OpenSSLCertificateSigningRequest", class_OpenSSLCertificateSigningRequest_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; +} + +zend_class_entry *register_class_OpenSSLAsymmetricKey() +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "OpenSSLAsymmetricKey", class_OpenSSLAsymmetricKey_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; +} + diff --git a/ext/pcntl/pcntl.stub.php b/ext/pcntl/pcntl.stub.php index ea66c9f898369..53c9b607ad8c6 100644 --- a/ext/pcntl/pcntl.stub.php +++ b/ext/pcntl/pcntl.stub.php @@ -1,6 +1,6 @@ create_object = pdo_dbh_new; pdo_dbh_ce->serialize = zend_class_serialize_deny; pdo_dbh_ce->unserialize = zend_class_unserialize_deny; diff --git a/ext/pdo/pdo_dbh.stub.php b/ext/pdo/pdo_dbh.stub.php index adca7d6b7a263..d25408db7e197 100644 --- a/ext/pdo/pdo_dbh.stub.php +++ b/ext/pdo/pdo_dbh.stub.php @@ -1,6 +1,6 @@