diff options
Diffstat (limited to 'ext/sqlite3/sqlite3.c')
-rw-r--r-- | ext/sqlite3/sqlite3.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index cd91e68fd3..1db9841252 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -306,7 +306,7 @@ PHP_METHOD(SQLite3, enableExtendedResultCodes) { php_sqlite3_db_object *db_obj; zval *object = ZEND_THIS; - zend_bool enable = 1; + bool enable = 1; db_obj = Z_SQLITE3_DB_P(object); int ret; @@ -660,7 +660,7 @@ PHP_METHOD(SQLite3, querySingle) zend_string *sql; char *errtext = NULL; int return_code; - zend_bool entire_row = 0; + bool entire_row = 0; sqlite3_stmt *stmt; db_obj = Z_SQLITE3_DB_P(object); @@ -1281,7 +1281,7 @@ PHP_METHOD(SQLite3, enableExceptions) { php_sqlite3_db_object *db_obj; zval *object = ZEND_THIS; - zend_bool enableExceptions = 0; + bool enableExceptions = 0; db_obj = Z_SQLITE3_DB_P(object); @@ -1607,7 +1607,7 @@ static int php_sqlite3_bind_params(php_sqlite3_stmt *stmt_obj) /* {{{ */ PHP_METHOD(SQLite3Stmt, getSQL) { php_sqlite3_stmt *stmt_obj; - zend_bool expanded = 0; + bool expanded = 0; zval *object = getThis(); stmt_obj = Z_SQLITE3_STMT_P(object); int bind_rc; @@ -2332,8 +2332,6 @@ static void sqlite3_param_dtor(zval *data) /* {{{ */ /* {{{ PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(sqlite3) { - zend_class_entry ce; - #ifdef ZTS /* Refuse to load if this wasn't a threasafe library loaded */ if (!sqlite3_threadsafe()) { @@ -2347,32 +2345,29 @@ PHP_MINIT_FUNCTION(sqlite3) memcpy(&sqlite3_result_object_handlers, &std_object_handlers, sizeof(zend_object_handlers)); /* Register SQLite 3 Class */ - INIT_CLASS_ENTRY(ce, "SQLite3", class_SQLite3_methods); - ce.create_object = php_sqlite3_object_new; sqlite3_object_handlers.offset = XtOffsetOf(php_sqlite3_db_object, zo); sqlite3_object_handlers.clone_obj = NULL; sqlite3_object_handlers.free_obj = php_sqlite3_object_free_storage; - php_sqlite3_sc_entry = zend_register_internal_class(&ce); + php_sqlite3_sc_entry = register_class_SQLite3(); + php_sqlite3_sc_entry->create_object = php_sqlite3_object_new; php_sqlite3_sc_entry->serialize = zend_class_serialize_deny; php_sqlite3_sc_entry->unserialize = zend_class_unserialize_deny; /* Register SQLite 3 Prepared Statement Class */ - INIT_CLASS_ENTRY(ce, "SQLite3Stmt", class_SQLite3Stmt_methods); - ce.create_object = php_sqlite3_stmt_object_new; sqlite3_stmt_object_handlers.offset = XtOffsetOf(php_sqlite3_stmt, zo); sqlite3_stmt_object_handlers.clone_obj = NULL; sqlite3_stmt_object_handlers.free_obj = php_sqlite3_stmt_object_free_storage; - php_sqlite3_stmt_entry = zend_register_internal_class(&ce); + php_sqlite3_stmt_entry = register_class_SQLite3Stmt(); + php_sqlite3_stmt_entry->create_object = php_sqlite3_stmt_object_new; php_sqlite3_stmt_entry->serialize = zend_class_serialize_deny; php_sqlite3_stmt_entry->unserialize = zend_class_unserialize_deny; /* Register SQLite 3 Result Class */ - INIT_CLASS_ENTRY(ce, "SQLite3Result", class_SQLite3Result_methods); - ce.create_object = php_sqlite3_result_object_new; sqlite3_result_object_handlers.offset = XtOffsetOf(php_sqlite3_result, zo); sqlite3_result_object_handlers.clone_obj = NULL; sqlite3_result_object_handlers.free_obj = php_sqlite3_result_object_free_storage; - php_sqlite3_result_entry = zend_register_internal_class(&ce); + php_sqlite3_result_entry = register_class_SQLite3Result(); + php_sqlite3_result_entry->create_object = php_sqlite3_result_object_new; php_sqlite3_result_entry->serialize = zend_class_serialize_deny; php_sqlite3_result_entry->unserialize = zend_class_unserialize_deny; |