cvs: /php4/ext/odbc php_odbc.h php_odbc.c

From: Date: Sun, 12 Mar 2000 01:03:54 +0000
Subject: cvs: /php4/ext/odbc php_odbc.h php_odbc.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-11927@lists.php.net to get a copy of this message
codelion Sat Mar 11 17:03:54 2000 EDT Modified files: /php4/ext/odbc php_odbc.h php_odbc.c Log: remove recent patch to _close_odbc_conn calling _free_odbc_result Index: php4/ext/odbc/php_odbc.h diff -u php4/ext/odbc/php_odbc.h:1.17 php4/ext/odbc/php_odbc.h:1.18 --- php4/ext/odbc/php_odbc.h:1.17 Thu Mar 9 14:19:57 2000 +++ php4/ext/odbc/php_odbc.h Sat Mar 11 17:03:23 2000 @@ -28,7 +28,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.h,v 1.17 2000/03/09 22:19:57 codelion Exp $ */ +/* $Id: php_odbc.h,v 1.18 2000/03/12 01:03:23 codelion Exp $ */ #ifndef _PHP_ODBC_H #define _PHP_ODBC_H @@ -218,7 +218,6 @@ /* int open;*/ int id; int persistent; - struct odbc_result *one_result; // to enable _close_odbc_conn to call _free_odbc_result } odbc_connection; typedef struct odbc_result_value { Index: php4/ext/odbc/php_odbc.c diff -u php4/ext/odbc/php_odbc.c:1.34 php4/ext/odbc/php_odbc.c:1.35 --- php4/ext/odbc/php_odbc.c:1.34 Sat Mar 11 12:48:49 2000 +++ php4/ext/odbc/php_odbc.c Sat Mar 11 17:03:23 2000 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.c,v 1.34 2000/03/11 20:48:49 andi Exp $ */ +/* $Id: php_odbc.c,v 1.35 2000/03/12 01:03:23 codelion Exp $ */ #if COMPILE_DL #include "dl/phpdl.h" @@ -160,18 +160,10 @@ * zend_list_delete(res->conn_ptr->id); */ } - if (res->conn_ptr) { - if (res->conn_ptr->one_result == res) { - res->conn_ptr->one_result = NULL; - }; - }; efree(res); } } -#define ODBC_REGISTER_RESULT_WITH_CONNECTION(result) if (!((result)->conn_ptr->one_result)) { \ - (result)->conn_ptr->one_result = (result); }; - static void _close_odbc_conn(odbc_connection *conn) { /* FIXME @@ -181,10 +173,6 @@ */ ODBCLS_FETCH(); - if (conn->one_result) { - zend_list_delete(conn->one_result->id); - conn->one_result = NULL; - }; SQLDisconnect(conn->hdbc); SQLFreeConnect(conn->hdbc); SQLFreeEnv(conn->henv); @@ -196,10 +184,6 @@ { ODBCLS_FETCH(); - if (conn->one_result) { - zend_list_delete(conn->one_result->id); - conn->one_result = NULL; - }; SQLDisconnect(conn->hdbc); SQLFreeConnect(conn->hdbc); SQLFreeEnv(conn->henv); @@ -704,7 +688,6 @@ zend_list_addref(conn->id); result->conn_ptr = conn; result->fetched = 0; - ODBC_REGISTER_RESULT_WITH_CONNECTION(result); RETURN_RESOURCE(result->id); } /* }}} */ @@ -1034,7 +1017,6 @@ zend_list_addref(conn->id); result->conn_ptr = conn; result->fetched = 0; - ODBC_REGISTER_RESULT_WITH_CONNECTION(result); RETURN_RESOURCE(result->id); } @@ -1601,7 +1583,6 @@ *conn = (odbc_connection *)pemalloc(sizeof(odbc_connection), persistent); (*conn)->persistent = persistent; - (*conn)->one_result = NULL; SQLAllocEnv(&((*conn)->henv)); SQLAllocConnect((*conn)->henv, &((*conn)->hdbc)); @@ -2270,7 +2251,6 @@ } result->conn_ptr = conn; result->fetched = 0; - ODBC_REGISTER_RESULT_WITH_CONNECTION(result); ZEND_REGISTER_RESOURCE(return_value, result, le_result); } /* }}} */ @@ -2353,7 +2333,6 @@ } result->conn_ptr = conn; result->fetched = 0; - ODBC_REGISTER_RESULT_WITH_CONNECTION(result); ZEND_REGISTER_RESOURCE(return_value, result, le_result); } /* }}} */ @@ -2433,7 +2412,6 @@ } result->conn_ptr = conn; result->fetched = 0; - ODBC_REGISTER_RESULT_WITH_CONNECTION(result); ZEND_REGISTER_RESOURCE(return_value, result, le_result); } /* }}} */ @@ -2534,7 +2512,6 @@ } result->conn_ptr = conn; result->fetched = 0; - ODBC_REGISTER_RESULT_WITH_CONNECTION(result); ZEND_REGISTER_RESOURCE(return_value, result, le_result); } /* }}} */ @@ -2608,7 +2585,6 @@ } result->conn_ptr = conn; result->fetched = 0; - ODBC_REGISTER_RESULT_WITH_CONNECTION(result); ZEND_REGISTER_RESOURCE(return_value, result, le_result); } /* }}} */ @@ -2684,7 +2660,6 @@ } result->conn_ptr = conn; result->fetched = 0; - ODBC_REGISTER_RESULT_WITH_CONNECTION(result); ZEND_REGISTER_RESOURCE(return_value, result, le_result); } /* }}} */ @@ -2768,7 +2743,6 @@ } result->conn_ptr = conn; result->fetched = 0; - ODBC_REGISTER_RESULT_WITH_CONNECTION(result); ZEND_REGISTER_RESOURCE(return_value, result, le_result); } /* }}} */ @@ -2850,7 +2824,6 @@ } result->conn_ptr = conn; result->fetched = 0; - ODBC_REGISTER_RESULT_WITH_CONNECTION(result); ZEND_REGISTER_RESOURCE(return_value, result, le_result); } /* }}} */ @@ -2940,7 +2913,6 @@ } result->conn_ptr = conn; result->fetched = 0; - ODBC_REGISTER_RESULT_WITH_CONNECTION(result); ZEND_REGISTER_RESOURCE(return_value, result, le_result); } /* }}} */ @@ -3025,7 +2997,6 @@ } result->conn_ptr = conn; result->fetched = 0; - ODBC_REGISTER_RESULT_WITH_CONNECTION(result); ZEND_REGISTER_RESOURCE(return_value, result, le_result); } /* }}} */ @@ -3102,7 +3073,6 @@ } result->conn_ptr = conn; result->fetched = 0; - ODBC_REGISTER_RESULT_WITH_CONNECTION(result); ZEND_REGISTER_RESOURCE(return_value, result, le_result); } /* }}} */

« previous php.version4 (#11927) next »