PHP_MINIT_FUNCTION(odbc)
{
- ELS_FETCH();
ODBCLS_D;
#ifdef SQLANY_BUG
HDBC foobar;
{
void *ptr;
int type;
- int i, nument = zend_hash_next_free_element(list);
+ int i, nument = zend_hash_next_free_element(&EG(regular_list));
for(i = 1; i < nument; i++) {
ptr = zend_list_find(i, &type);
if (persistent) {
list_entry *le;
- if (zend_hash_find(plist, hashed_details, hashed_len + 1, (void **) &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;
new_le.type = le_pconn;
new_le.ptr = db_conn;
- if (zend_hash_update(plist, hashed_details, hashed_len + 1, &new_le,
+ if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_len + 1, &new_le,
sizeof(list_entry), NULL) == FAILURE) {
free(db_conn);
efree(hashed_details);
d_name, sizeof(d_name), &len);
if(ret != SQL_SUCCESS){
- zend_hash_del(plist, hashed_details, hashed_len + 1);
+ zend_hash_del(&EG(persistent_list), hashed_details, hashed_len + 1);
SQLDisconnect(db_conn->hdbc);
SQLFreeConnect(db_conn->hdbc);
goto try_and_get_another_connection;
} else { /* non persistent */
list_entry *index_ptr, new_index_ptr;
- if (zend_hash_find(list, hashed_details, hashed_len + 1,
+ if (zend_hash_find(&EG(regular_list), hashed_details, hashed_len + 1,
(void **) &index_ptr) == SUCCESS) {
int type, conn_id;
void *ptr;
efree(hashed_details);
return;
} else {
- zend_hash_del(list, hashed_details, hashed_len + 1);
+ zend_hash_del(&EG(regular_list), hashed_details, hashed_len + 1);
}
}
if (ODBCG(max_links) != -1 && ODBCG(num_links) >= ODBCG(max_links)) {
ZEND_REGISTER_RESOURCE(return_value, db_conn, le_conn);
new_index_ptr.ptr = (void *) return_value->value.lval;
new_index_ptr.type = le_index_ptr;
- if (zend_hash_update(list, hashed_details, hashed_len + 1, (void *) &new_index_ptr,
+ if (zend_hash_update(&EG(regular_list), hashed_details, hashed_len + 1, (void *) &new_index_ptr,
sizeof(list_entry), NULL) == FAILURE) {
efree(hashed_details);
RETURN_FALSE;