sniper Mon Dec 5 18:31:18 2005 EDT Modified files: /php-src/ext/fbsql php_fbsql.c /php-src/ext/informix ifx.ec /php-src/ext/interbase interbase.c /php-src/ext/msql php_msql.c /php-src/ext/mssql php_mssql.c /php-src/ext/mysql php_mysql.c /php-src/ext/oci8 oci8.c /php-src/ext/odbc php_odbc.c /php-src/ext/pgsql pgsql.c /php-src/ext/sqlite sqlite.c /php-src/ext/sybase php_sybase_db.c /php-src/ext/sybase_ct php_sybase_ct.c /php-src/main/streams streams.c Log: - list_entry -> zend_rsrc_list_entry
http://cvs.php.net/diff.php/php-src/ext/fbsql/php_fbsql.c?r1=1.114&r2=1.115&ty=u Index: php-src/ext/fbsql/php_fbsql.c diff -u php-src/ext/fbsql/php_fbsql.c:1.114 php-src/ext/fbsql/php_fbsql.c:1.115 --- php-src/ext/fbsql/php_fbsql.c:1.114 Wed Aug 3 10:07:08 2005 +++ php-src/ext/fbsql/php_fbsql.c Mon Dec 5 18:30:56 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_fbsql.c,v 1.114 2005/08/03 14:07:08 sniper Exp $ */ +/* $Id: php_fbsql.c,v 1.115 2005/12/05 23:30:56 sniper Exp $ */ /* TODO: * @@ -502,7 +502,7 @@ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) { PHPFBLink* phpLink; - list_entry *lep; + zend_rsrc_list_entry *lep; char name[1024]; char *hostName = NULL, *userName = NULL, *userPassword = NULL; int argc = ZEND_NUM_ARGS(), create_new = 0; @@ -543,7 +543,7 @@ phpLink = (PHPFBLink*)lep->ptr; } else { - list_entry le; + zend_rsrc_list_entry le; if ((FB_SQL_G(maxLinks) != -1 && FB_SQL_G(linkCount) == FB_SQL_G(maxLinks))) { @@ -592,7 +592,7 @@ } else { - list_entry le; + zend_rsrc_list_entry le; if ((FB_SQL_G(maxLinks) != -1 && FB_SQL_G(linkCount) == FB_SQL_G(maxLinks))) { http://cvs.php.net/diff.php/php-src/ext/informix/ifx.ec?r1=1.109&r2=1.110&ty=u Index: php-src/ext/informix/ifx.ec diff -u php-src/ext/informix/ifx.ec:1.109 php-src/ext/informix/ifx.ec:1.110 --- php-src/ext/informix/ifx.ec:1.109 Wed Aug 3 10:07:17 2005 +++ php-src/ext/informix/ifx.ec Mon Dec 5 18:30:59 2005 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ifx.ec,v 1.109 2005/08/03 14:07:17 sniper Exp $ */ +/* $Id: ifx.ec,v 1.110 2005/12/05 23:30:59 sniper Exp $ */ /* ------------------------------------------------------------------- * if you want a function reference : "grep '^\*\*' ifx.ec" will give @@ -527,11 +527,11 @@ } if (persistent) { - list_entry *le; + zend_rsrc_list_entry *le; /* try to find if we already have this link in our persistent list */ if (zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_length + 1, (void **) &le) == FAILURE) { /* we don't */ - list_entry new_le; + zend_rsrc_list_entry new_le; if (IFXG(max_links) != -1 && IFXG(num_links) >= IFXG(max_links)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%d)", IFXG(num_links)); @@ -564,7 +564,7 @@ /* hash it up */ new_le.type = le_plink; new_le.ptr = ifx; - if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length + 1, (void *) &new_le, sizeof(list_entry), NULL) == FAILURE) { + if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length + 1, (void *) &new_le, sizeof(zend_rsrc_list_entry), NULL) == FAILURE) { free(ifx); efree(hashed_details); RETURN_FALSE; @@ -596,7 +596,7 @@ } ZEND_REGISTER_RESOURCE(return_value, ifx, le_plink); } else { /* non persistent */ - list_entry *index_ptr,new_index_ptr; + zend_rsrc_list_entry *index_ptr,new_index_ptr; /* first we check the hash for the hashed_details key. if it exists, * it should point us to the right offset where the actual ifx link sits. @@ -670,7 +670,7 @@ /* add it to the hash */ new_index_ptr.ptr = (void *) return_value->value.lval; new_index_ptr.type = le_index_ptr; - if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length + 1, (void *) &new_index_ptr, sizeof(list_entry), NULL) == FAILURE) { + if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length + 1, (void *) &new_index_ptr, sizeof(zend_rsrc_list_entry), NULL) == FAILURE) { efree(hashed_details); RETURN_FALSE; } http://cvs.php.net/diff.php/php-src/ext/interbase/interbase.c?r1=1.225&r2=1.226&ty=u Index: php-src/ext/interbase/interbase.c diff -u php-src/ext/interbase/interbase.c:1.225 php-src/ext/interbase/interbase.c:1.226 --- php-src/ext/interbase/interbase.c:1.225 Wed Aug 3 10:07:19 2005 +++ php-src/ext/interbase/interbase.c Mon Dec 5 18:31:01 2005 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: interbase.c,v 1.225 2005/08/03 14:07:19 sniper Exp $ */ +/* $Id: interbase.c,v 1.226 2005/12/05 23:31:01 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -616,7 +616,7 @@ int i, len[] = { 0, 0, 0, 0, 0 }; long largs[] = { 0, 0, 0 }; PHP_MD5_CTX hash_context; - list_entry new_index_ptr, *le; + zend_rsrc_list_entry new_index_ptr, *le; isc_db_handle db_handle = NULL; ibase_db_link *ib_link; @@ -715,7 +715,7 @@ ib_link = (ibase_db_link *) emalloc(sizeof(ibase_db_link)); ZEND_REGISTER_RESOURCE(return_value, ib_link, le_link); } else { - list_entry new_le; + zend_rsrc_list_entry new_le; ib_link = (ibase_db_link *) malloc(sizeof(ibase_db_link)); @@ -723,7 +723,7 @@ Z_TYPE(new_le) = le_plink; new_le.ptr = ib_link; if (FAILURE == zend_hash_update(&EG(persistent_list), hash, sizeof(hash), - (void *) &new_le, sizeof(list_entry), NULL)) { + (void *) &new_le, sizeof(zend_rsrc_list_entry), NULL)) { free(ib_link); RETURN_FALSE; } @@ -742,7 +742,7 @@ new_index_ptr.ptr = (void *) Z_LVAL_P(return_value); Z_TYPE(new_index_ptr) = le_index_ptr; if (FAILURE == zend_hash_update(&EG(regular_list), hash, sizeof(hash), - (void *) &new_index_ptr, sizeof(list_entry), NULL)) { + (void *) &new_index_ptr, sizeof(zend_rsrc_list_entry), NULL)) { RETURN_FALSE; } zend_list_addref(IBG(default_link) = Z_LVAL_P(return_value)); http://cvs.php.net/diff.php/php-src/ext/msql/php_msql.c?r1=1.61&r2=1.62&ty=u Index: php-src/ext/msql/php_msql.c diff -u php-src/ext/msql/php_msql.c:1.61 php-src/ext/msql/php_msql.c:1.62 --- php-src/ext/msql/php_msql.c:1.61 Mon Dec 5 17:21:12 2005 +++ php-src/ext/msql/php_msql.c Mon Dec 5 18:31:04 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_msql.c,v 1.61 2005/12/05 22:21:12 sniper Exp $ */ +/* $Id: php_msql.c,v 1.62 2005/12/05 23:31:04 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -264,7 +264,7 @@ persistent=0; } if (persistent) { - list_entry *le; + zend_rsrc_list_entry *le; if (msql_globals.max_links!=-1 && msql_globals.num_links>=msql_globals.max_links) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%d)", msql_globals.num_links); @@ -279,7 +279,7 @@ /* try to find if we already have this link in our persistent list */ if (zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_length+1, (void **) &le)==FAILURE) { /* we don't */ - list_entry new_le; + zend_rsrc_list_entry new_le; /* create the link */ if ((msql=msqlConnect(host))==-1) { @@ -290,7 +290,7 @@ /* hash it up */ Z_TYPE(new_le) = msql_globals.le_plink; new_le.ptr = (void *) msql; - if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(list_entry), NULL)==FAILURE) { + if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) { efree(hashed_details); RETURN_FALSE; } @@ -317,7 +317,7 @@ } ZEND_REGISTER_RESOURCE(return_value, (void *) msql, msql_globals.le_plink); } else { - list_entry *index_ptr,new_index_ptr; + zend_rsrc_list_entry *index_ptr,new_index_ptr; /* first we check the hash for the hashed_details key. if it exists, * it should point us to the right offset where the actual msql link sits. @@ -358,7 +358,7 @@ /* add it to the hash */ new_index_ptr.ptr = (void *) Z_LVAL_P(return_value); Z_TYPE(new_index_ptr) = le_index_ptr; - if (zend_hash_update(&EG(regular_list),hashed_details,hashed_details_length+1,(void *) &new_index_ptr, sizeof(list_entry), NULL)==FAILURE) { + if (zend_hash_update(&EG(regular_list),hashed_details,hashed_details_length+1,(void *) &new_index_ptr, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) { efree(hashed_details); RETURN_FALSE; } http://cvs.php.net/diff.php/php-src/ext/mssql/php_mssql.c?r1=1.159&r2=1.160&ty=u Index: php-src/ext/mssql/php_mssql.c diff -u php-src/ext/mssql/php_mssql.c:1.159 php-src/ext/mssql/php_mssql.c:1.160 --- php-src/ext/mssql/php_mssql.c:1.159 Fri Nov 18 16:22:50 2005 +++ php-src/ext/mssql/php_mssql.c Mon Dec 5 18:31:04 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mssql.c,v 1.159 2005/11/18 21:22:50 fmk Exp $ */ +/* $Id: php_mssql.c,v 1.160 2005/12/05 23:31:04 sniper Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -170,7 +170,7 @@ return 0; } -static int _clean_invalid_results(list_entry *le TSRMLS_DC) +static int _clean_invalid_results(zend_rsrc_list_entry *le TSRMLS_DC) { if (Z_TYPE_P(le) == le_result) { mssql_link *mssql_ptr = ((mssql_result *) le->ptr)->mssql_ptr; @@ -510,11 +510,11 @@ persistent=0; } if (persistent) { - list_entry *le; + zend_rsrc_list_entry *le; /* try to find if we already have this link in our persistent list */ if (new_link || zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_length + 1, (void **) &le)==FAILURE) { /* we don't */ - list_entry new_le; + zend_rsrc_list_entry new_le; if (MS_SQL_G(max_links) != -1 && MS_SQL_G(num_links) >= MS_SQL_G(max_links)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", MS_SQL_G(num_links)); @@ -566,7 +566,7 @@ memcpy(mssql_ptr, &mssql, sizeof(mssql_link)); Z_TYPE(new_le) = le_plink; new_le.ptr = mssql_ptr; - if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length + 1, &new_le, sizeof(list_entry), NULL)==FAILURE) { + if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length + 1, &new_le, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) { free(mssql_ptr); efree(hashed_details); dbfreelogin(mssql.login); @@ -619,7 +619,7 @@ } ZEND_REGISTER_RESOURCE(return_value, mssql_ptr, le_plink); } else { /* non persistent */ - list_entry *index_ptr, new_index_ptr; + zend_rsrc_list_entry *index_ptr, new_index_ptr; /* first we check the hash for the hashed_details key. if it exists, * it should point us to the right offset where the actual mssql link sits. @@ -696,7 +696,7 @@ /* add it to the hash */ new_index_ptr.ptr = (void *) Z_LVAL_P(return_value); Z_TYPE(new_index_ptr) = le_index_ptr; - if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length + 1,(void *) &new_index_ptr, sizeof(list_entry),NULL)==FAILURE) { + if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length + 1,(void *) &new_index_ptr, sizeof(zend_rsrc_list_entry),NULL)==FAILURE) { efree(hashed_details); RETURN_FALSE; } http://cvs.php.net/diff.php/php-src/ext/mysql/php_mysql.c?r1=1.216&r2=1.217&ty=u Index: php-src/ext/mysql/php_mysql.c diff -u php-src/ext/mysql/php_mysql.c:1.216 php-src/ext/mysql/php_mysql.c:1.217 --- php-src/ext/mysql/php_mysql.c:1.216 Mon Dec 5 08:20:53 2005 +++ php-src/ext/mysql/php_mysql.c Mon Dec 5 18:31:05 2005 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mysql.c,v 1.216 2005/12/05 13:20:53 tony2001 Exp $ */ +/* $Id: php_mysql.c,v 1.217 2005/12/05 23:31:05 sniper Exp $ */ /* TODO: * @@ -654,11 +654,11 @@ persistent=0; } if (persistent) { - list_entry *le; + zend_rsrc_list_entry *le; /* try to find if we already have this link in our persistent list */ if (zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_length+1, (void **) &le)==FAILURE) { /* we don't */ - list_entry new_le; + zend_rsrc_list_entry new_le; if (MySG(max_links)!=-1 && MySG(num_links)>=MySG(max_links)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", MySG(num_links)); @@ -698,7 +698,7 @@ /* hash it up */ Z_TYPE(new_le) = le_plink; new_le.ptr = mysql; - if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(list_entry), NULL)==FAILURE) { + if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) { free(mysql); efree(hashed_details); MYSQL_DO_CONNECT_RETURN_FALSE(); @@ -741,7 +741,7 @@ } ZEND_REGISTER_RESOURCE(return_value, mysql, le_plink); } else { /* non persistent */ - list_entry *index_ptr, new_index_ptr; + zend_rsrc_list_entry *index_ptr, new_index_ptr; /* first we check the hash for the hashed_details key. if it exists, * it should point us to the right offset where the actual mysql link sits. @@ -806,7 +806,7 @@ /* add it to the hash */ new_index_ptr.ptr = (void *) Z_LVAL_P(return_value); Z_TYPE(new_index_ptr) = le_index_ptr; - if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length+1,(void *) &new_index_ptr, sizeof(list_entry), NULL)==FAILURE) { + if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length+1,(void *) &new_index_ptr, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) { efree(hashed_details); MYSQL_DO_CONNECT_RETURN_FALSE(); } http://cvs.php.net/diff.php/php-src/ext/oci8/oci8.c?r1=1.285&r2=1.286&ty=u Index: php-src/ext/oci8/oci8.c diff -u php-src/ext/oci8/oci8.c:1.285 php-src/ext/oci8/oci8.c:1.286 --- php-src/ext/oci8/oci8.c:1.285 Sat Nov 26 12:34:35 2005 +++ php-src/ext/oci8/oci8.c Mon Dec 5 18:31:05 2005 @@ -26,7 +26,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci8.c,v 1.285 2005/11/26 17:34:35 tony2001 Exp $ */ +/* $Id: oci8.c,v 1.286 2005/12/05 23:31:05 sniper Exp $ */ /* TODO * * file://localhost/www/docs/oci10/ociaahan.htm#423823 - implement lob_empty() with OCI_ATTR_LOBEMPTY @@ -87,7 +87,7 @@ static void php_oci_descriptor_list_dtor (zend_rsrc_list_entry * TSRMLS_DC); static void php_oci_collection_list_dtor (zend_rsrc_list_entry * TSRMLS_DC); -static int php_oci_persistent_helper(list_entry *le TSRMLS_DC); +static int php_oci_persistent_helper(zend_rsrc_list_entry *le TSRMLS_DC); static int php_oci_connection_ping(php_oci_connection * TSRMLS_DC); static int php_oci_connection_status(php_oci_connection * TSRMLS_DC); static int php_oci_connection_close(php_oci_connection * TSRMLS_DC); @@ -635,7 +635,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "OCI8 Support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.285 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.286 $"); sprintf(buf, "%ld", OCI_G(num_persistent)); php_info_print_table_row(2, "Active Persistent Connections", buf); @@ -925,8 +925,8 @@ * The real connect function. Allocates all the resources needed, establishes the connection and returns the result handle (or NULL) */ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char *password, int password_len, char *new_password, int new_password_len, char *dbname, int dbname_len, char *charset, long session_mode, int persistent, int exclusive TSRMLS_DC) { - list_entry *le; - list_entry new_le; + zend_rsrc_list_entry *le; + zend_rsrc_list_entry new_le; php_oci_connection *connection = NULL; smart_str hashed_details = {0}; time_t timestamp; @@ -1300,14 +1300,14 @@ new_le.type = le_pconnection; connection->used_this_request = 1; connection->rsrc_id = zend_list_insert(connection, le_pconnection); - zend_hash_update(&EG(persistent_list), connection->hash_key, strlen(connection->hash_key)+1, (void *)&new_le, sizeof(list_entry), NULL); + zend_hash_update(&EG(persistent_list), connection->hash_key, strlen(connection->hash_key)+1, (void *)&new_le, sizeof(zend_rsrc_list_entry), NULL); OCI_G(num_persistent)++; } else if (!exclusive) { connection->rsrc_id = zend_list_insert(connection, le_connection); new_le.ptr = (void *)connection->rsrc_id; new_le.type = le_index_ptr; - zend_hash_update(&EG(regular_list), connection->hash_key, strlen(connection->hash_key)+1, (void *)&new_le, sizeof(list_entry), NULL); + zend_hash_update(&EG(regular_list), connection->hash_key, strlen(connection->hash_key)+1, (void *)&new_le, sizeof(zend_rsrc_list_entry), NULL); OCI_G(num_links)++; } else { @@ -1672,7 +1672,7 @@ /* {{{ php_oci_persistent_helper() Helper function to close/rollback persistent connections at the end of request */ -static int php_oci_persistent_helper(list_entry *le TSRMLS_DC) +static int php_oci_persistent_helper(zend_rsrc_list_entry *le TSRMLS_DC) { time_t timestamp; php_oci_connection *connection; http://cvs.php.net/diff.php/php-src/ext/odbc/php_odbc.c?r1=1.190&r2=1.191&ty=u Index: php-src/ext/odbc/php_odbc.c diff -u php-src/ext/odbc/php_odbc.c:1.190 php-src/ext/odbc/php_odbc.c:1.191 --- php-src/ext/odbc/php_odbc.c:1.190 Thu Sep 8 02:18:47 2005 +++ php-src/ext/odbc/php_odbc.c Mon Dec 5 18:31:06 2005 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.c,v 1.190 2005/09/08 06:18:47 dmitry Exp $ */ +/* $Id: php_odbc.c,v 1.191 2005/12/05 23:31:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -716,7 +716,7 @@ /* }}} */ /* {{{ _close_pconn_with_id */ -static int _close_pconn_with_id(list_entry *le, int *id TSRMLS_DC) +static int _close_pconn_with_id(zend_rsrc_list_entry *le, int *id TSRMLS_DC) { if(Z_TYPE_P(le) == le_pconn && (((odbc_connection *)(le->ptr))->id == *id)){ return 1; @@ -2274,11 +2274,11 @@ try_and_get_another_connection: if (persistent) { - list_entry *le; + zend_rsrc_list_entry *le; if (zend_hash_find(&EG(persistent_list), hashed_details, hashed_len + 1, (void **) &le) == FAILURE) { /* the link is not in the persistent list */ - list_entry new_le; + zend_rsrc_list_entry new_le; if (ODBCG(max_links) != -1 && ODBCG(num_links) >= ODBCG(max_links)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", ODBCG(num_links)); @@ -2299,7 +2299,7 @@ Z_TYPE(new_le) = le_pconn; new_le.ptr = db_conn; if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_len + 1, &new_le, - sizeof(list_entry), NULL) == FAILURE) { + sizeof(zend_rsrc_list_entry), NULL) == FAILURE) { free(db_conn); efree(hashed_details); RETURN_FALSE; @@ -2343,7 +2343,7 @@ } db_conn->id = ZEND_REGISTER_RESOURCE(return_value, db_conn, le_pconn); } else { /* non persistent */ - list_entry *index_ptr, new_index_ptr; + zend_rsrc_list_entry *index_ptr, new_index_ptr; if (zend_hash_find(&EG(regular_list), hashed_details, hashed_len + 1, (void **) &index_ptr) == SUCCESS) { @@ -2378,7 +2378,7 @@ new_index_ptr.ptr = (void *) Z_LVAL_P(return_value); Z_TYPE(new_index_ptr) = le_index_ptr; if (zend_hash_update(&EG(regular_list), hashed_details, hashed_len + 1, (void *) &new_index_ptr, - sizeof(list_entry), NULL) == FAILURE) { + sizeof(zend_rsrc_list_entry), NULL) == FAILURE) { efree(hashed_details); RETURN_FALSE; /* XXX Free Connection */ http://cvs.php.net/diff.php/php-src/ext/pgsql/pgsql.c?r1=1.335&r2=1.336&ty=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.335 php-src/ext/pgsql/pgsql.c:1.336 --- php-src/ext/pgsql/pgsql.c:1.335 Mon Nov 7 07:56:19 2005 +++ php-src/ext/pgsql/pgsql.c Mon Dec 5 18:31:07 2005 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c,v 1.335 2005/11/07 12:56:19 helly Exp $ */ +/* $Id: pgsql.c,v 1.336 2005/12/05 23:31:07 sniper Exp $ */ #include <stdlib.h> @@ -646,11 +646,11 @@ } if (persistent && PGG(allow_persistent)) { - list_entry *le; + zend_rsrc_list_entry *le; /* try to find if we already have this link in our persistent list */ if (zend_hash_find(&EG(persistent_list), str.c, str.len+1, (void **) &le)==FAILURE) { /* we don't */ - list_entry new_le; + zend_rsrc_list_entry new_le; if (PGG(max_links)!=-1 && PGG(num_links)>=PGG(max_links)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, @@ -680,7 +680,7 @@ /* hash it up */ Z_TYPE(new_le) = le_plink; new_le.ptr = pgsql; - if (zend_hash_update(&EG(persistent_list), str.c, str.len+1, (void *) &new_le, sizeof(list_entry), NULL)==FAILURE) { + if (zend_hash_update(&EG(persistent_list), str.c, str.len+1, (void *) &new_le, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) { goto err; } PGG(num_links)++; @@ -726,7 +726,7 @@ } ZEND_REGISTER_RESOURCE(return_value, pgsql, le_plink); } else { /* Non persistent connection */ - list_entry *index_ptr,new_index_ptr; + zend_rsrc_list_entry *index_ptr,new_index_ptr; /* first we check the hash for the hashed_details key. if it exists, * it should point us to the right offset where the actual pgsql link sits. @@ -776,7 +776,7 @@ /* add it to the hash */ new_index_ptr.ptr = (void *) Z_LVAL_P(return_value); Z_TYPE(new_index_ptr) = le_index_ptr; - if (zend_hash_update(&EG(regular_list),str.c,str.len+1,(void *) &new_index_ptr, sizeof(list_entry), NULL)==FAILURE) { + if (zend_hash_update(&EG(regular_list),str.c,str.len+1,(void *) &new_index_ptr, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) { goto err; } PGG(num_links)++; @@ -1633,7 +1633,7 @@ { PGresult *result; smart_str str = {0}; - list_entry *field_type; + zend_rsrc_list_entry *field_type; char *ret=NULL; /* try to lookup the type in the resource list */ @@ -1647,7 +1647,7 @@ int i,num_rows; int oid_offset,name_offset; char *tmp_oid, *end_ptr, *tmp_name; - list_entry new_oid_entry; + zend_rsrc_list_entry new_oid_entry; if ((result = PQexec(pgsql,"select oid,typname from pg_type")) == NULL || PQresultStatus(result) != PGRES_TUPLES_OK) { if (result) { @@ -1675,7 +1675,7 @@ } Z_TYPE(new_oid_entry) = le_string; new_oid_entry.ptr = estrdup(tmp_name); - zend_hash_update(list,str.c,str.len+1,(void *) &new_oid_entry, sizeof(list_entry), NULL); + zend_hash_update(list,str.c,str.len+1,(void *) &new_oid_entry, sizeof(zend_rsrc_list_entry), NULL); if (!ret && strtoul(tmp_oid, &end_ptr, 10)==oid) { ret = estrdup(tmp_name); } http://cvs.php.net/diff.php/php-src/ext/sqlite/sqlite.c?r1=1.179&r2=1.180&ty=u Index: php-src/ext/sqlite/sqlite.c diff -u php-src/ext/sqlite/sqlite.c:1.179 php-src/ext/sqlite/sqlite.c:1.180 --- php-src/ext/sqlite/sqlite.c:1.179 Mon Dec 5 15:41:57 2005 +++ php-src/ext/sqlite/sqlite.c Mon Dec 5 18:31:08 2005 @@ -17,7 +17,7 @@ | Marcus Boerger <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: sqlite.c,v 1.179 2005/12/05 20:41:57 bfrance Exp $ + $Id: sqlite.c,v 1.180 2005/12/05 23:31:08 sniper Exp $ */ #ifdef HAVE_CONFIG_H @@ -794,7 +794,7 @@ } u; } sqlite_object; -static int sqlite_free_persistent(list_entry *le, void *ptr TSRMLS_DC) +static int sqlite_free_persistent(zend_rsrc_list_entry *le, void *ptr TSRMLS_DC) { return le->ptr == ptr ? ZEND_HASH_APPLY_REMOVE : ZEND_HASH_APPLY_KEEP; } @@ -1128,7 +1128,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "SQLite support", "enabled"); - php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.179 2005/12/05 20:41:57 bfrance Exp $"); + php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.180 2005/12/05 23:31:08 sniper Exp $"); php_info_print_table_row(2, "SQLite Library", sqlite_libversion()); php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding()); php_info_print_table_end(); @@ -1195,7 +1195,7 @@ } if (persistent_id) { - list_entry le; + zend_rsrc_list_entry le; Z_TYPE(le) = le_sqlite_pdb; le.ptr = db; @@ -1219,7 +1219,7 @@ int filename_len, hashkeylen; zval *errmsg = NULL; struct php_sqlite_db *db = NULL; - list_entry *le; + zend_rsrc_list_entry *le; if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz/", &filename, &filename_len, &mode, &errmsg)) { http://cvs.php.net/diff.php/php-src/ext/sybase/php_sybase_db.c?r1=1.66&r2=1.67&ty=u Index: php-src/ext/sybase/php_sybase_db.c diff -u php-src/ext/sybase/php_sybase_db.c:1.66 php-src/ext/sybase/php_sybase_db.c:1.67 --- php-src/ext/sybase/php_sybase_db.c:1.66 Sat Aug 6 01:42:42 2005 +++ php-src/ext/sybase/php_sybase_db.c Mon Dec 5 18:31:08 2005 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sybase_db.c,v 1.66 2005/08/06 05:42:42 fmk Exp $ */ +/* $Id: php_sybase_db.c,v 1.67 2005/12/05 23:31:08 sniper Exp $ */ #ifdef HAVE_CONFIG_H @@ -168,7 +168,7 @@ } -static int _clean_invalid_results(list_entry *le TSRMLS_DC) +static int _clean_invalid_results(zend_rsrc_list_entry *le TSRMLS_DC) { if (Z_TYPE_P(le) == php_sybase_module.le_result) { sybase_link *sybase_ptr = ((sybase_result *) le->ptr)->sybase_ptr; @@ -437,11 +437,11 @@ persistent=0; } if (persistent) { - list_entry *le; + zend_rsrc_list_entry *le; /* try to find if we already have this link in our persistent list */ if (zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_length+1, (void **) &le)==FAILURE) { /* we don't */ - list_entry new_le; + zend_rsrc_list_entry new_le; if (php_sybase_module.max_links!=-1 && php_sybase_module.num_links>=php_sybase_module.max_links) { php_error_docref(NULL TSRMLS_CC, E_WARNING,"Sybase: Too many open links (%d)",php_sybase_module.num_links); @@ -466,7 +466,7 @@ memcpy(sybase_ptr,&sybase,sizeof(sybase_link)); Z_TYPE(new_le) = php_sybase_module.le_plink; new_le.ptr = sybase_ptr; - if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(list_entry),NULL)==FAILURE) { + if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(zend_rsrc_list_entry),NULL)==FAILURE) { free(sybase_ptr); goto err_link; } @@ -495,7 +495,7 @@ Z_LVAL_P(return_value) = zend_list_insert(sybase_ptr,php_sybase_module.le_plink); Z_TYPE_P(return_value) = IS_LONG; } else { /* non persistent */ - list_entry *index_ptr,new_index_ptr; + zend_rsrc_list_entry *index_ptr,new_index_ptr; /* first we check the hash for the hashed_details key. if it exists, * it should point us to the right offset where the actual sybase link sits. @@ -544,7 +544,7 @@ /* add it to the hash */ new_index_ptr.ptr = (void *) Z_LVAL_P(return_value); Z_TYPE(new_index_ptr) = le_index_ptr; - if (zend_hash_update(&EG(regular_list),hashed_details,hashed_details_length+1,(void *) &new_index_ptr, sizeof(list_entry),NULL)==FAILURE) { + if (zend_hash_update(&EG(regular_list),hashed_details,hashed_details_length+1,(void *) &new_index_ptr, sizeof(zend_rsrc_list_entry),NULL)==FAILURE) { goto err_link; } php_sybase_module.num_links++; http://cvs.php.net/diff.php/php-src/ext/sybase_ct/php_sybase_ct.c?r1=1.105&r2=1.106&ty=u Index: php-src/ext/sybase_ct/php_sybase_ct.c diff -u php-src/ext/sybase_ct/php_sybase_ct.c:1.105 php-src/ext/sybase_ct/php_sybase_ct.c:1.106 --- php-src/ext/sybase_ct/php_sybase_ct.c:1.105 Mon Aug 22 08:22:15 2005 +++ php-src/ext/sybase_ct/php_sybase_ct.c Mon Dec 5 18:31:09 2005 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sybase_ct.c,v 1.105 2005/08/22 12:22:15 dmitry Exp $ */ +/* $Id: php_sybase_ct.c,v 1.106 2005/12/05 23:31:09 sniper Exp $ */ #ifdef HAVE_CONFIG_H @@ -108,7 +108,7 @@ #define CHECK_LINK(link) { if (link==-1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: A link to the server could not be established"); RETURN_FALSE; } } -static int _clean_invalid_results(list_entry *le TSRMLS_DC) +static int _clean_invalid_results(zend_rsrc_list_entry *le TSRMLS_DC) { if (Z_TYPE_P(le) == le_result) { sybase_link *sybase_ptr = ((sybase_result *) le->ptr)->sybase_ptr; @@ -677,11 +677,11 @@ persistent=0; } if (persistent) { - list_entry *le; + zend_rsrc_list_entry *le; /* try to find if we already have this link in our persistent list */ if (zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_length+1, (void **) &le)==FAILURE) { /* we don't */ - list_entry new_le; + zend_rsrc_list_entry new_le; if (SybCtG(max_links)!=-1 && SybCtG(num_links)>=SybCtG(max_links)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Too many open links (%ld)", SybCtG(num_links)); @@ -704,7 +704,7 @@ /* hash it up */ Z_TYPE(new_le) = le_plink; new_le.ptr = sybase_ptr; - if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(list_entry), NULL)==FAILURE) { + if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) { ct_close(sybase_ptr->connection, CS_UNUSED); ct_con_drop(sybase_ptr->connection); free(sybase_ptr); @@ -759,7 +759,7 @@ } ZEND_REGISTER_RESOURCE(return_value, sybase_ptr, le_plink); } else { /* non persistent */ - list_entry *index_ptr, new_index_ptr; + zend_rsrc_list_entry *index_ptr, new_index_ptr; /* first we check the hash for the hashed_details key. if it exists, * it should point us to the right offset where the actual sybase link sits. @@ -805,7 +805,7 @@ /* add it to the hash */ new_index_ptr.ptr = (void *) Z_LVAL_P(return_value); Z_TYPE(new_index_ptr) = le_index_ptr; - if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length+1, (void *) &new_index_ptr, sizeof(list_entry), NULL)==FAILURE) { + if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length+1, (void *) &new_index_ptr, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) { ct_close(sybase_ptr->connection, CS_UNUSED); ct_con_drop(sybase_ptr->connection); efree(sybase_ptr); http://cvs.php.net/diff.php/php-src/main/streams/streams.c?r1=1.90&r2=1.91&ty=u Index: php-src/main/streams/streams.c diff -u php-src/main/streams/streams.c:1.90 php-src/main/streams/streams.c:1.91 --- php-src/main/streams/streams.c:1.90 Fri Nov 18 11:20:43 2005 +++ php-src/main/streams/streams.c Mon Dec 5 18:31:09 2005 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streams.c,v 1.90 2005/11/18 16:20:43 rasmus Exp $ */ +/* $Id: streams.c,v 1.91 2005/12/05 23:31:09 sniper Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -65,7 +65,7 @@ return &url_stream_wrappers_hash; } -static int _php_stream_release_context(list_entry *le, void *pContext TSRMLS_DC) +static int _php_stream_release_context(zend_rsrc_list_entry *le, void *pContext TSRMLS_DC) { if (le->ptr == pContext) { return --le->refcount == 0; @@ -267,7 +267,7 @@ } /* }}} */ -static int _php_stream_free_persistent(list_entry *le, void *pStream TSRMLS_DC) +static int _php_stream_free_persistent(zend_rsrc_list_entry *le, void *pStream TSRMLS_DC) { return le->ptr == pStream; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php