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

@ -157,6 +157,7 @@ static zend_object *pgsql_link_create_object(zend_class_entry *class_type) {
zend_object_std_init(&intern->std, class_type);
object_properties_init(&intern->std, class_type);
intern->std.handlers = &pgsql_link_object_handlers;
return &intern->std;
}
@ -212,6 +213,7 @@ static zend_object *pgsql_result_create_object(zend_class_entry *class_type) {
zend_object_std_init(&intern->std, class_type);
object_properties_init(&intern->std, class_type);
intern->std.handlers = &pgsql_result_object_handlers;
return &intern->std;
}
@ -249,6 +251,7 @@ static zend_object *pgsql_lob_create_object(zend_class_entry *class_type) {
zend_object_std_init(&intern->std, class_type);
object_properties_init(&intern->std, class_type);
intern->std.handlers = &pgsql_lob_object_handlers;
return &intern->std;
}
@ -437,7 +440,6 @@ PHP_MINIT_FUNCTION(pgsql)
pgsql_link_ce = register_class_PgSql_Connection();
pgsql_link_ce->create_object = pgsql_link_create_object;
pgsql_link_ce->default_object_handlers = &pgsql_link_object_handlers;
memcpy(&pgsql_link_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
pgsql_link_object_handlers.offset = XtOffsetOf(pgsql_link_handle, std);
@ -448,7 +450,6 @@ PHP_MINIT_FUNCTION(pgsql)
pgsql_result_ce = register_class_PgSql_Result();
pgsql_result_ce->create_object = pgsql_result_create_object;
pgsql_result_ce->default_object_handlers = &pgsql_result_object_handlers;
memcpy(&pgsql_result_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
pgsql_result_object_handlers.offset = XtOffsetOf(pgsql_result_handle, std);
@ -459,7 +460,6 @@ PHP_MINIT_FUNCTION(pgsql)
pgsql_lob_ce = register_class_PgSql_Lob();
pgsql_lob_ce->create_object = pgsql_lob_create_object;
pgsql_lob_ce->default_object_handlers = &pgsql_lob_object_handlers;
memcpy(&pgsql_lob_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
pgsql_lob_object_handlers.offset = XtOffsetOf(pgLofp, std);