/* static int oci_ping(oci_connection *conn); XXX NYI */
static void oci_debug(const char *format,...);
-static void _oci_close_conn(oci_connection *connection);
-static void _oci_free_stmt(oci_statement *statement);
+static void _oci_connection_dtor(oci_connection *connection);
+static void _oci_statement_dtor(oci_statement *statement);
static int _oci_column_dtor(void *data);
static int _oci_descr_dtor(void *data);
#endif
- le_conn = register_list_destructors(_oci_close_conn, NULL);
- le_stmt = register_list_destructors(_oci_free_stmt, NULL);
+ le_conn = register_list_destructors(_oci_connection_dtor, NULL);
+ le_stmt = register_list_destructors(_oci_statement_dtor, NULL);
INIT_CLASS_ENTRY(oci_lob_class_entry, "OCI-Lob", php_oci_lob_class_functions);
{
oci_out_column *column = (oci_out_column *) data;
- /*
oci_debug("_oci_column_dtor: %s",column->name);
- */
if (column->data) {
if (column->is_descr) {
}
/* }}} */
-/* {{{ _oci_free_stmt() */
+/* {{{ _oci_statement_dtor() */
static void
-_oci_free_stmt(oci_statement *statement)
+_oci_statement_dtor(oci_statement *statement)
{
if (! statement) {
return;
}
- oci_debug("_oci_free_stmt: id=%d last_query=\"%s\"",statement->id,SAFE_STRING(statement->last_query));
+ oci_debug("_oci_statement_dtor: id=%d last_query=\"%s\"",statement->id,SAFE_STRING(statement->last_query));
if (statement->pStmt) {
OCIHandleFree(statement->pStmt, OCI_HTYPE_STMT);
}
/* }}} */
-/* {{{ _oci_close_conn() */
+/* {{{ _oci_connection_dtor() */
static void
-_oci_close_conn(oci_connection *connection)
+_oci_connection_dtor(oci_connection *connection)
{
if (! connection) {
return;
as the connection is "only" a in memory service context we do not disconnect from oracle.
*/
- oci_debug("_oci_close_conn: id=%d",connection->id);
+ oci_debug("_oci_connection_dtor: id=%d",connection->id);
if (connection->descriptors) {
zend_hash_destroy(connection->descriptors);
if (connection->open) {
return connection;
} else {
- /* _oci_close_conn(connection); be careful with this!! */
+ /* _oci_connection_dtor(connection); be careful with this!! */
return (oci_connection *)NULL;
}
}
if (statement->conn->open) {
return statement;
} else {
- /* _oci_free_stmt(statement); be careful with this!! */
+ /* _oci_statement_dtor(statement); be careful with this!! */
return (oci_statement *)NULL;
}
}
{
oci_descriptor *descr = (oci_descriptor *) data;
- oci_debug("oci_free_descr: %x",descr->ocidescr);
+ oci_debug("_oci_descr_dtor: %x",descr->ocidescr);
OCIDescriptorFree(descr->ocidescr, descr->type);
if (connection->id) {
php3_list_delete(connection->id);
} else {
- _oci_close_conn(connection);
+ _oci_connection_dtor(connection);
}
RETURN_FALSE;