Revert "Port all internally used classes to use default_object_handlers"

This reverts commit 94ee4f9834.

The commit was a bit too late to be included in PHP 8.2 RC1. Given it's a massive ABI break, we decide to postpone the change to PHP 8.3.
This commit is contained in:
Bob Weinand 2022-09-14 11:12:19 +02:00
parent d228651a71
commit a01dd9feda
57 changed files with 115 additions and 108 deletions

View file

@ -2298,6 +2298,8 @@ static zend_object *php_sqlite3_object_new(zend_class_entry *class_type) /* {{{
zend_object_std_init(&intern->zo, class_type);
object_properties_init(&intern->zo, class_type);
intern->zo.handlers = &sqlite3_object_handlers;
return &intern->zo;
}
/* }}} */
@ -2312,6 +2314,8 @@ static zend_object *php_sqlite3_stmt_object_new(zend_class_entry *class_type) /*
zend_object_std_init(&intern->zo, class_type);
object_properties_init(&intern->zo, class_type);
intern->zo.handlers = &sqlite3_stmt_object_handlers;
return &intern->zo;
}
/* }}} */
@ -2326,6 +2330,8 @@ static zend_object *php_sqlite3_result_object_new(zend_class_entry *class_type)
zend_object_std_init(&intern->zo, class_type);
object_properties_init(&intern->zo, class_type);
intern->zo.handlers = &sqlite3_result_object_handlers;
return &intern->zo;
}
/* }}} */
@ -2367,7 +2373,6 @@ PHP_MINIT_FUNCTION(sqlite3)
sqlite3_object_handlers.free_obj = php_sqlite3_object_free_storage;
php_sqlite3_sc_entry = register_class_SQLite3();
php_sqlite3_sc_entry->create_object = php_sqlite3_object_new;
php_sqlite3_sc_entry->default_object_handlers = &sqlite3_object_handlers;
/* Register SQLite 3 Prepared Statement Class */
sqlite3_stmt_object_handlers.offset = XtOffsetOf(php_sqlite3_stmt, zo);
@ -2375,7 +2380,6 @@ PHP_MINIT_FUNCTION(sqlite3)
sqlite3_stmt_object_handlers.free_obj = php_sqlite3_stmt_object_free_storage;
php_sqlite3_stmt_entry = register_class_SQLite3Stmt();
php_sqlite3_stmt_entry->create_object = php_sqlite3_stmt_object_new;
php_sqlite3_stmt_entry->default_object_handlers = &sqlite3_stmt_object_handlers;
/* Register SQLite 3 Result Class */
sqlite3_result_object_handlers.offset = XtOffsetOf(php_sqlite3_result, zo);
@ -2383,7 +2387,6 @@ PHP_MINIT_FUNCTION(sqlite3)
sqlite3_result_object_handlers.free_obj = php_sqlite3_result_object_free_storage;
php_sqlite3_result_entry = register_class_SQLite3Result();
php_sqlite3_result_entry->create_object = php_sqlite3_result_object_new;
php_sqlite3_result_entry->default_object_handlers = &sqlite3_result_object_handlers;
REGISTER_INI_ENTRIES();