summaryrefslogtreecommitdiff
path: root/ext/oci8/oci8.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/oci8/oci8.c')
-rw-r--r--ext/oci8/oci8.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index ad9b23a9c4..93fba39c17 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);
@@ -923,8 +917,8 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
smart_str hashed_details = {0};
time_t timestamp;
php_oci_spool *session_pool = NULL;
- zend_bool use_spool = 1; /* Default is to use client-side session pool */
- zend_bool ping_done = 0;
+ bool use_spool = 1; /* Default is to use client-side session pool */
+ bool ping_done = 0;
ub2 charsetid = 0;
ub2 charsetid_nls_lang = 0;
@@ -1042,7 +1036,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
php_strtolower(ZSTR_VAL(hashed_details.s), ZSTR_LEN(hashed_details.s));
if (!exclusive && !new_password) {
- zend_bool found = 0;
+ bool found = 0;
if (persistent && ((zvp = zend_hash_find(&EG(persistent_list), hashed_details.s))) != NULL) {
zend_resource *le = Z_RES_P(zvp);
@@ -1190,7 +1184,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
* a last resort, return a non-persistent connection.
*/
if (persistent) {
- zend_bool alloc_non_persistent = 0;
+ bool alloc_non_persistent = 0;
if (OCI_G(max_persistent) != -1 && OCI_G(num_persistent) >= OCI_G(max_persistent)) {
/* try to find an idle connection and kill it */
@@ -1436,7 +1430,7 @@ int php_oci_connection_commit(php_oci_connection *connection)
static int php_oci_connection_close(php_oci_connection *connection)
{
int result = 0;
- zend_bool in_call_save = OCI_G(in_call);
+ bool in_call_save = OCI_G(in_call);
#ifdef HAVE_OCI8_DTRACE
if (DTRACE_OCI8_CONNECTION_CLOSE_ENABLED()) {
@@ -1528,7 +1522,7 @@ static int php_oci_connection_close(php_oci_connection *connection)
int php_oci_connection_release(php_oci_connection *connection)
{
int result = 0;
- zend_bool in_call_save = OCI_G(in_call);
+ bool in_call_save = OCI_G(in_call);
time_t timestamp = time(NULL);
if (connection->is_stub) {
@@ -1989,7 +1983,7 @@ static int php_oci_persistent_helper(zval *zv)
static php_oci_spool *php_oci_create_spool(char *username, int username_len, char *password, int password_len, char *dbname, int dbname_len, zend_string *hash_key, int charsetid)
{
php_oci_spool *session_pool = NULL;
- zend_bool iserror = 0;
+ bool iserror = 0;
ub4 poolmode = OCI_DEFAULT; /* Mode to be passed to OCISessionPoolCreate */
OCIAuthInfo *spoolAuth = NULL;
sword errstatus;
@@ -2128,7 +2122,7 @@ static php_oci_spool *php_oci_get_spool(char *username, int username_len, char *
smart_str spool_hashed_details = {0};
php_oci_spool *session_pool = NULL;
zend_resource *spool_out_le = NULL;
- zend_bool iserror = 0;
+ bool iserror = 0;
zval *spool_out_zv = NULL;
/* {{{ Create the spool hash key */