CVS update: php3/functions

From: Date: Tue, 23 Feb 1999 17:45:34 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-4264@lists.php.net to get a copy of this message
Date: Tuesday February 23, 1999 @ 12:45 Author: thies Update of /repository/php3/functions In directory asf:/u/temp/cvs-serv7458 Modified Files: oci8.c oracle.c Log Message: oci8 now runs in non threaded mode again - and it uses it's own memory manager added #ifdef stuff that we need in oracle.c if we want oci to run in threaded mode (we will have to turn it on in oci8.c AND oracle.c). some more warnings. Index: php3/functions/oci8.c diff -c php3/functions/oci8.c:1.63 php3/functions/oci8.c:1.64 *** php3/functions/oci8.c:1.63 Tue Feb 23 11:09:38 1999 --- php3/functions/oci8.c Tue Feb 23 12:45:33 1999 *************** *** 1,4 **** ! #define OCI8_USE_EMALLOC 1 /* set this to 1 if you want to use the php memory manager! */ /* +----------------------------------------------------------------------+ | PHP HTML Embedded Scripting Language Version 3.0 | --- 1,4 ---- ! #define OCI8_USE_EMALLOC 0 /* set this to 1 if you want to use the php memory manager! */ /* +----------------------------------------------------------------------+ | PHP HTML Embedded Scripting Language Version 3.0 | *************** *** 32,38 **** +----------------------------------------------------------------------+ */ ! /* $Id: oci8.c,v 1.63 1999/02/23 16:09:38 thies Exp $ */ #if defined(COMPILE_DL) # ifdef THREAD_SAFE --- 32,38 ---- +----------------------------------------------------------------------+ */ ! /* $Id: oci8.c,v 1.64 1999/02/23 17:45:33 thies Exp $ */ #if defined(COMPILE_DL) # ifdef THREAD_SAFE *************** *** 357,362 **** --- 357,364 ---- OCI8_GLOBAL(php3_oci8_module).num_links = OCI8_GLOBAL(php3_oci8_module).num_persistent; + OCI8_GLOBAL(php3_oci8_module).debug_mode = 0; /* start "fresh" */ + return SUCCESS; } *************** *** 436,442 **** static int oci8_free_define(oci8_define *define) { ! oci8_debug("oci8_free_define:"); if (define->name) { efree(define->name); --- 438,444 ---- static int oci8_free_define(oci8_define *define) { ! oci8_debug("oci8_free_define: %s",define->name); if (define->name) { efree(define->name); *************** *** 451,457 **** static int oci8_free_column(oci8_out_column *column) { ! oci8_debug("oci8_free_column:"); if (column->data) { if (column->is_descr) { --- 453,459 ---- static int oci8_free_column(oci8_out_column *column) { ! oci8_debug("oci8_free_column: %s",column->name); if (column->data) { if (column->is_descr) { *************** *** 529,535 **** { OCI8_TLS_VARS; ! oci8_debug("oci8_close_conn:"); _php3_hash_destroy(connection->descriptors); efree(connection->descriptors); --- 531,537 ---- { OCI8_TLS_VARS; ! oci8_debug("oci8_close_conn: id=%d",connection->id); _php3_hash_destroy(connection->descriptors); efree(connection->descriptors); *************** *** 803,809 **** OCI_HTYPE_STMT, 0, NULL); OCIHandleAlloc(connection->pEnv, (dvoid **)&statement->pError, OCI_HTYPE_ERROR, 0, NULL); - oci8_debug("oci8_parse \"%s\"",query); error = oci8_error(statement->pError, "OCIParse", OCIStmtPrepare(statement->pStmt, connection->pError, query, len, --- 805,810 ---- *************** *** 816,821 **** --- 817,824 ---- statement->conn = connection; statement->id = php3_list_insert(statement, OCI8_GLOBAL(php3_oci8_module).le_stmt); + oci8_debug("oci8_parse \"%s\" id=%d",query,statement->id); + return statement->id; } *************** *** 1673,1679 **** loblen = arg->value.str.len; if (loblen < 1) { ! php3_error(E_WARNING, "Cannot save a lob wich size is < 1 byte"); RETURN_FALSE; } --- 1676,1682 ---- loblen = arg->value.str.len; if (loblen < 1) { ! php3_error(E_WARNING, "Cannot save a lob wich size is less than 1 byte"); RETURN_FALSE; } *************** *** 2294,2302 **** /* OCI_OBJECT is not supported as of now, but it should not harm!! */ #if OCI8_USE_EMALLOC ! OCIInitialize((OCI_THREADED | OCI_OBJECT), (dvoid *)connection, ocimalloc, ocirealloc, ocifree); #else ! OCIInitialize((OCI_THREADED | OCI_OBJECT), NULL, NULL, NULL, NULL); #endif OCIEnvInit(&connection->pEnv, OCI_DEFAULT, 0, NULL); OCIHandleAlloc(connection->pEnv, (dvoid **)&connection->pServiceContext, OCI_HTYPE_SVCCTX, 0, NULL); --- 2297,2305 ---- /* OCI_OBJECT is not supported as of now, but it should not harm!! */ #if OCI8_USE_EMALLOC ! OCIInitialize(OCI_DEFAULT, (dvoid *)connection, ocimalloc, ocirealloc, ocifree); #else ! OCIInitialize(OCI_DEFAULT, NULL, NULL, NULL, NULL); #endif OCIEnvInit(&connection->pEnv, OCI_DEFAULT, 0, NULL); OCIHandleAlloc(connection->pEnv, (dvoid **)&connection->pServiceContext, OCI_HTYPE_SVCCTX, 0, NULL); *************** *** 2353,2361 **** RETURN_FALSE; } ! RETVAL_LONG(connection->id); OCI8_GLOBAL(php3_oci8_module).num_links++; } /* }}} */ --- 2356,2366 ---- RETURN_FALSE; } ! oci8_debug("OCILogon: new connection id=%d",connection->id); OCI8_GLOBAL(php3_oci8_module).num_links++; + + RETVAL_LONG(connection->id); } /* }}} */ Index: php3/functions/oracle.c diff -c php3/functions/oracle.c:1.94 php3/functions/oracle.c:1.95 *** php3/functions/oracle.c:1.94 Thu Feb 18 12:48:52 1999 --- php3/functions/oracle.c Tue Feb 23 12:45:33 1999 *************** *** 30,36 **** +----------------------------------------------------------------------+ */ ! /* $Id: oracle.c,v 1.94 1999/02/18 17:48:52 shane Exp $ */ #if defined(COMPILE_DL) # if PHP_31 --- 30,36 ---- +----------------------------------------------------------------------+ */ ! /* $Id: oracle.c,v 1.95 1999/02/23 17:45:33 thies Exp $ */ #if defined(COMPILE_DL) # if PHP_31 *************** *** 308,313 **** --- 308,318 ---- REGISTER_LONG_CONSTANT("ORA_FETCHINTO_ASSOC",ORA_FETCHINTO_ASSOC, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("ORA_FETCHINTO_NULLS",ORA_FETCHINTO_NULLS, CONST_CS | CONST_PERSISTENT); + + #if NEEDED + opinit(OCI_EV_TSF); /* initialize threaded environment - must match the threaded mode + of the oci8 driver if both are used at the same time!! */ + #endif return SUCCESS; } -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#4264) next »