php_pqtxn_object_t *obj = o;
PGresult *res;
- if ((obj->intern->readonly = zend_is_true(value))) {
+ if ((obj->intern->readonly = z_is_true(value))) {
res = PQexec(obj->intern->conn->intern->conn, "SET TRANSACTION READ ONLY");
} else {
res = PQexec(obj->intern->conn->intern->conn, "SET TRANSACTION READ WRITE");
php_pqtxn_object_t *obj = o;
PGresult *res;
- if ((obj->intern->deferrable = zend_is_true(value))) {
+ if ((obj->intern->deferrable = z_is_true(value))) {
res = PQexec(obj->intern->conn->intern->conn, "SET TRANSACTION DEFERRABLE");
} else {
res = PQexec(obj->intern->conn->intern->conn, "SET TRANSACTION NOT DEFERRABLE");
{0}
};
+PHP_MSHUTDOWN_FUNCTION(pqtxn)
+{
+ zend_hash_destroy(&php_pqtxn_object_prophandlers);
+ return SUCCESS;
+}
+
PHP_MINIT_FUNCTION(pqtxn)
{
zend_class_entry ce = {0};
php_pqtxn_object_handlers.write_property = php_pq_object_write_prop;
php_pqtxn_object_handlers.clone_obj = NULL;
php_pqtxn_object_handlers.get_property_ptr_ptr = NULL;
+ php_pqtxn_object_handlers.get_gc = NULL;
php_pqtxn_object_handlers.get_properties = php_pq_object_properties;
php_pqtxn_object_handlers.get_debug_info = php_pq_object_debug_info;