]> granicus.if.org Git - php/commitdiff
MFH: list_entry -> zend_rsrc_list_entry
authorfoobar <sniper@php.net>
Mon, 5 Dec 2005 23:38:04 +0000 (23:38 +0000)
committerfoobar <sniper@php.net>
Mon, 5 Dec 2005 23:38:04 +0000 (23:38 +0000)
13 files changed:
ext/fbsql/php_fbsql.c
ext/informix/ifx.ec
ext/interbase/interbase.c
ext/msql/php_msql.c
ext/mssql/php_mssql.c
ext/mysql/php_mysql.c
ext/oci8/oci8.c
ext/odbc/php_odbc.c
ext/pgsql/pgsql.c
ext/sqlite/sqlite.c
ext/sybase/php_sybase_db.c
ext/sybase_ct/php_sybase_ct.c
main/streams/streams.c

index 340a653697f478783588e35d6f1dc054e2cad624..26496eb89db1971c4ba6e24f6a6a065b42b92ed5 100644 (file)
@@ -502,7 +502,7 @@ PHP_MINFO_FUNCTION(fbsql)
 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 @@ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                        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 @@ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
        }
        else
        {
-               list_entry le;
+               zend_rsrc_list_entry le;
 
                if ((FB_SQL_G(maxLinks) != -1 && FB_SQL_G(linkCount) == FB_SQL_G(maxLinks)))
                {
index 16a1e6054f5fc38d020ffff357c33063386545aa..8b988c818e767cf33e188f12bde26cd2284bdc7f 100644 (file)
@@ -527,11 +527,11 @@ EXEC SQL END DECLARE SECTION;
        }
 
        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 @@ EXEC SQL END DECLARE SECTION;
                        /* 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 @@ EXEC SQL END DECLARE SECTION;
                }
                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 @@ EXEC SQL END DECLARE SECTION;
                /* 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;
                }
index dbb810cb8552fccf9dc616c1e9a89402c9171e76..14d25113b372c70676843723ee263bdcc9b919ef 100644 (file)
@@ -616,7 +616,7 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /*
        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 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /*
                        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 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /*
                        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 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /*
        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));
index 905c721ec3daf993ebf52c6d2d9819d090dd3e5d..cc7454f550d7dfdfefedf998a5add46e3d969adf 100644 (file)
@@ -264,7 +264,7 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
                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 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
                
                /* 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 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
                        /* 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 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
                }
                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 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
                /* 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;
                }
index ae7538288463615e7fa786c72306d763ca93e816..0e83fb8fe2d363e2a05a041cc55e710ad3ee9ab6 100644 (file)
@@ -170,7 +170,7 @@ static int php_mssql_message_handler(DBPROCESS *dbproc, DBINT msgno,int msgstate
        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 @@ static void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                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 @@ static void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                        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 @@ static void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                }
                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 @@ static void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                /* 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;
                }
index 84e83758c027b44d968e80593c9456f97b45ad1d..052b0b51dc2343671df68766fdb645bd532b97bb 100644 (file)
@@ -661,11 +661,11 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                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));
@@ -705,7 +705,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                        /* 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();
@@ -748,7 +748,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                }
                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.
@@ -813,7 +813,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                /* 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();
                }
index 2eca5e38f69adaeee1d0221b395079dcb4c7beea..ca81753e0f0adb229411b846f2b5ba58ba8e5804 100644 (file)
@@ -87,7 +87,7 @@ static void php_oci_statement_list_dtor (zend_rsrc_list_entry * TSRMLS_DC);
 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);
@@ -925,8 +925,8 @@ void php_oci_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent, int exclus
  * 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 @@ open:
                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 @@ void php_oci_fetch_row (INTERNAL_FUNCTION_PARAMETERS, int mode, int expected_arg
 
 /* {{{ 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;
index 83c45c1f13e03fd74daea6fcdb6bbcd8c529475c..a40c7d7838847b306ca4b8e4c68413b1bd3098dc 100644 (file)
@@ -716,7 +716,7 @@ void odbc_transact(INTERNAL_FUNCTION_PARAMETERS, int type)
 /* }}} */
 
 /* {{{ _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 @@ void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
 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 @@ try_and_get_another_connection:
                        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 @@ try_and_get_another_connection:
                }
                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 @@ try_and_get_another_connection:
                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 */
index d279db5dc0bf94bf55aa01e5ce2f5b699388ecbd..20ea794673549c7bb82dca02a96484190539a4e8 100644 (file)
@@ -646,11 +646,11 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
        }
        
        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 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                        /* 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 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                }
                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 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                /* 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 @@ static char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list TSRMLS_DC)
 {
        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 @@ static char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list TSRMLS_DC)
                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 @@ static char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list TSRMLS_DC)
                        }
                        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);
                        }
index af1f393871377bb33caa46e77887d59a6dbeecec..b45dffbbd3657e25f9c6f2fd54d7bc1fb03ee3b8 100644 (file)
@@ -793,7 +793,7 @@ typedef struct _sqlite_object {
        } 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;
 }
@@ -1194,7 +1194,7 @@ static struct php_sqlite_db *php_sqlite_open(char *filename, int mode, char *per
        }
 
        if (persistent_id) {
-               list_entry le;
+               zend_rsrc_list_entry le;
 
                Z_TYPE(le) = le_sqlite_pdb;
                le.ptr = db;
@@ -1218,7 +1218,7 @@ PHP_FUNCTION(sqlite_popen)
        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)) {
index ae46a5703700a18ec45f99ab6e701d847f7b0a60..ab2f6d4d968ced0110f346210276739934a0baf5 100644 (file)
@@ -168,7 +168,7 @@ static int php_sybase_message_handler(DBPROCESS *dbproc,DBINT msgno,int msgstate
 }
 
 
-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 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
                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 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
                        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 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
                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 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
                /* 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++;
index 0442c5a6f2e63e23592c38ce717f190a6b9ad1c5..20517b6f60d78c52b7f076f8049f70cb3343f02e 100644 (file)
@@ -108,7 +108,7 @@ ZEND_DECLARE_MODULE_GLOBALS(sybase)
 #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 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                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 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                        /* 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 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                }
                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 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                /* 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);
index d3ede8fc44234f4ea4e0da8d7bc26c279f44b232..e5858619d4df456d289b1fe134d5e7e6db2fc23f 100755 (executable)
@@ -65,7 +65,7 @@ PHPAPI HashTable *php_stream_get_url_stream_wrappers_hash_global(void)
        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 @@ fprintf(stderr, "stream_alloc: %s:%p persistent=%s\n", ops->label, ret, persiste
 }
 /* }}} */
 
-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;
 }