summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/fbsql/php_fbsql.c6
-rw-r--r--ext/informix/ifx.ec10
-rw-r--r--ext/interbase/interbase.c8
-rw-r--r--ext/msql/php_msql.c10
-rw-r--r--ext/mssql/php_mssql.c12
-rw-r--r--ext/mysql/php_mysql.c10
-rw-r--r--ext/oci8/oci8.c12
-rw-r--r--ext/odbc/php_odbc.c12
-rw-r--r--ext/pgsql/pgsql.c16
-rw-r--r--ext/sqlite/sqlite.c6
-rw-r--r--ext/sybase/php_sybase_db.c12
-rw-r--r--ext/sybase_ct/php_sybase_ct.c12
-rwxr-xr-xmain/streams/streams.c4
13 files changed, 65 insertions, 65 deletions
diff --git a/ext/fbsql/php_fbsql.c b/ext/fbsql/php_fbsql.c
index 340a653697..26496eb89d 100644
--- a/ext/fbsql/php_fbsql.c
+++ b/ext/fbsql/php_fbsql.c
@@ -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)))
{
diff --git a/ext/informix/ifx.ec b/ext/informix/ifx.ec
index 16a1e6054f..8b988c818e 100644
--- a/ext/informix/ifx.ec
+++ b/ext/informix/ifx.ec
@@ -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;
}
diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c
index dbb810cb85..14d25113b3 100644
--- a/ext/interbase/interbase.c
+++ b/ext/interbase/interbase.c
@@ -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));
diff --git a/ext/msql/php_msql.c b/ext/msql/php_msql.c
index 905c721ec3..cc7454f550 100644
--- a/ext/msql/php_msql.c
+++ b/ext/msql/php_msql.c
@@ -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;
}
diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c
index ae75382884..0e83fb8fe2 100644
--- a/ext/mssql/php_mssql.c
+++ b/ext/mssql/php_mssql.c
@@ -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;
}
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index 84e83758c0..052b0b51dc 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -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();
}
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 2eca5e38f6..ca81753e0f 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -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;
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index 83c45c1f13..a40c7d7838 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -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 */
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index d279db5dc0..20ea794673 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -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);
}
diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c
index af1f393871..b45dffbbd3 100644
--- a/ext/sqlite/sqlite.c
+++ b/ext/sqlite/sqlite.c
@@ -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)) {
diff --git a/ext/sybase/php_sybase_db.c b/ext/sybase/php_sybase_db.c
index ae46a57037..ab2f6d4d96 100644
--- a/ext/sybase/php_sybase_db.c
+++ b/ext/sybase/php_sybase_db.c
@@ -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++;
diff --git a/ext/sybase_ct/php_sybase_ct.c b/ext/sybase_ct/php_sybase_ct.c
index 0442c5a6f2..20517b6f60 100644
--- a/ext/sybase_ct/php_sybase_ct.c
+++ b/ext/sybase_ct/php_sybase_ct.c
@@ -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);
diff --git a/main/streams/streams.c b/main/streams/streams.c
index d3ede8fc44..e5858619d4 100755
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -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;
}