summaryrefslogtreecommitdiff
path: root/ext/sybase/php_sybase_db.c
diff options
context:
space:
mode:
authorJeroen van Wolffelaar <jeroen@php.net>2001-09-25 21:58:48 +0000
committerJeroen van Wolffelaar <jeroen@php.net>2001-09-25 21:58:48 +0000
commitc03328857394bef36ffa9678d33079ad96e4a4e4 (patch)
treec0fb250db3b1bb996fc305bf56c2b74eb6d00935 /ext/sybase/php_sybase_db.c
parent158d34c9a57816326e141e88e1409d9f377dc2ea (diff)
downloadphp-git-c03328857394bef36ffa9678d33079ad96e4a4e4.tar.gz
Back-substitute for Z_* macro's. If it breaks some extension (the script isn't optimal, it parses for example var->zval.value incorrect) please let me know.
Diffstat (limited to 'ext/sybase/php_sybase_db.c')
-rw-r--r--ext/sybase/php_sybase_db.c180
1 files changed, 90 insertions, 90 deletions
diff --git a/ext/sybase/php_sybase_db.c b/ext/sybase/php_sybase_db.c
index ef4c5c196b..6bd9ac2f80 100644
--- a/ext/sybase/php_sybase_db.c
+++ b/ext/sybase/php_sybase_db.c
@@ -164,7 +164,7 @@ static int php_sybase_message_handler(DBPROCESS *dbproc,DBINT msgno,int msgstate
static int _clean_invalid_results(list_entry *le TSRMLS_DC)
{
- if (le->type == php_sybase_module.le_result) {
+ if (Z_TYPE_P(le) == php_sybase_module.le_result) {
sybase_link *sybase_ptr = ((sybase_result *) le->ptr)->sybase_ptr;
if (!sybase_ptr->valid) {
@@ -318,10 +318,10 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
RETURN_FALSE;
}
convert_to_string(yyhost);
- host = yyhost->value.str.val;
- hashed_details_length = yyhost->value.str.len+6+4;
+ host = Z_STRVAL_P(yyhost);
+ hashed_details_length = Z_STRLEN_P(yyhost)+6+4;
hashed_details = (char *) emalloc(hashed_details_length+1);
- sprintf(hashed_details,"sybase_%s___",yyhost->value.str.val);
+ sprintf(hashed_details,"sybase_%s___",Z_STRVAL_P(yyhost));
}
break;
case 2: {
@@ -332,11 +332,11 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
}
convert_to_string(yyhost);
convert_to_string(yyuser);
- host = yyhost->value.str.val;
- user = yyuser->value.str.val;
- hashed_details_length = yyhost->value.str.len+yyuser->value.str.len+6+4;
+ host = Z_STRVAL_P(yyhost);
+ user = Z_STRVAL_P(yyuser);
+ hashed_details_length = Z_STRLEN_P(yyhost)+Z_STRLEN_P(yyuser)+6+4;
hashed_details = (char *) emalloc(hashed_details_length+1);
- sprintf(hashed_details,"sybase_%s_%s__",yyhost->value.str.val,yyuser->value.str.val);
+ sprintf(hashed_details,"sybase_%s_%s__",Z_STRVAL_P(yyhost),Z_STRVAL_P(yyuser));
}
break;
case 3: {
@@ -348,12 +348,12 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
convert_to_string(yyhost);
convert_to_string(yyuser);
convert_to_string(yypasswd);
- host = yyhost->value.str.val;
- user = yyuser->value.str.val;
- passwd = yypasswd->value.str.val;
- hashed_details_length = yyhost->value.str.len+yyuser->value.str.len+yypasswd->value.str.len+6+4;
+ host = Z_STRVAL_P(yyhost);
+ user = Z_STRVAL_P(yyuser);
+ passwd = Z_STRVAL_P(yypasswd);
+ hashed_details_length = Z_STRLEN_P(yyhost)+Z_STRLEN_P(yyuser)+Z_STRLEN_P(yypasswd)+6+4;
hashed_details = (char *) emalloc(hashed_details_length+1);
- sprintf(hashed_details,"sybase_%s_%s_%s_",yyhost->value.str.val,yyuser->value.str.val,yypasswd->value.str.val); /* SAFE */
+ sprintf(hashed_details,"sybase_%s_%s_%s_",Z_STRVAL_P(yyhost),Z_STRVAL_P(yyuser),Z_STRVAL_P(yypasswd)); /* SAFE */
}
break;
case 4: {
@@ -366,13 +366,13 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
convert_to_string(yyuser);
convert_to_string(yypasswd);
convert_to_string(yycharset);
- host = yyhost->value.str.val;
- user = yyuser->value.str.val;
- passwd = yypasswd->value.str.val;
- charset = yycharset->value.str.val;
- hashed_details_length = yyhost->value.str.len+yyuser->value.str.len+yypasswd->value.str.len+yycharset->value.str.len+6+4;
+ host = Z_STRVAL_P(yyhost);
+ user = Z_STRVAL_P(yyuser);
+ passwd = Z_STRVAL_P(yypasswd);
+ charset = Z_STRVAL_P(yycharset);
+ hashed_details_length = Z_STRLEN_P(yyhost)+Z_STRLEN_P(yyuser)+Z_STRLEN_P(yypasswd)+Z_STRLEN_P(yycharset)+6+4;
hashed_details = (char *) emalloc(hashed_details_length+1);
- sprintf(hashed_details,"sybase_%s_%s_%s_%s",yyhost->value.str.val,yyuser->value.str.val,yypasswd->value.str.val,yycharset->value.str.val); /* SAFE */
+ sprintf(hashed_details,"sybase_%s_%s_%s_%s",Z_STRVAL_P(yyhost),Z_STRVAL_P(yyuser),Z_STRVAL_P(yypasswd),Z_STRVAL_P(yycharset)); /* SAFE */
}
break;
default:
@@ -439,7 +439,7 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
/* hash it up */
sybase_ptr = (sybase_link *) malloc(sizeof(sybase_link));
memcpy(sybase_ptr,&sybase,sizeof(sybase_link));
- new_le.type = php_sybase_module.le_plink;
+ 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) {
free(sybase_ptr);
@@ -450,7 +450,7 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
php_sybase_module.num_persistent++;
php_sybase_module.num_links++;
} else { /* we do */
- if (le->type != php_sybase_module.le_plink) {
+ if (Z_TYPE_P(le) != php_sybase_module.le_plink) {
php_error(E_WARNING,"Sybase: Hashed persistent link is not a Sybase link!");
RETURN_FALSE;
}
@@ -471,8 +471,8 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
}
}
}
- return_value->value.lval = zend_list_insert(sybase_ptr,php_sybase_module.le_plink);
- return_value->type = IS_LONG;
+ 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;
@@ -485,14 +485,14 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
int type,link;
void *ptr;
- if (index_ptr->type != le_index_ptr) {
+ if (Z_TYPE_P(index_ptr) != le_index_ptr) {
RETURN_FALSE;
}
link = (int) index_ptr->ptr;
ptr = zend_list_find(link,&type); /* check if the link is still there */
if (ptr && (type==php_sybase_module.le_link || type==php_sybase_module.le_plink)) {
- return_value->value.lval = php_sybase_module.default_link = link;
- return_value->type = IS_LONG;
+ Z_LVAL_P(return_value) = php_sybase_module.default_link = link;
+ Z_TYPE_P(return_value) = IS_LONG;
efree(hashed_details);
return;
} else {
@@ -521,12 +521,12 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
/* add it to the list */
sybase_ptr = (sybase_link *) emalloc(sizeof(sybase_link));
memcpy(sybase_ptr,&sybase,sizeof(sybase_link));
- return_value->value.lval = zend_list_insert(sybase_ptr,php_sybase_module.le_link);
- return_value->type = IS_LONG;
+ Z_LVAL_P(return_value) = zend_list_insert(sybase_ptr,php_sybase_module.le_link);
+ Z_TYPE_P(return_value) = IS_LONG;
/* add it to the hash */
- new_index_ptr.ptr = (void *) return_value->value.lval;
- new_index_ptr.type = le_index_ptr;
+ 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) {
efree(hashed_details);
RETURN_FALSE;
@@ -534,7 +534,7 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
php_sybase_module.num_links++;
}
efree(hashed_details);
- php_sybase_module.default_link=return_value->value.lval;
+ php_sybase_module.default_link=Z_LVAL_P(return_value);
}
@@ -580,7 +580,7 @@ PHP_FUNCTION(sybase_close)
RETURN_FALSE;
}
convert_to_long(sybase_link_index);
- id = sybase_link_index->value.lval;
+ id = Z_LVAL_P(sybase_link_index);
break;
default:
WRONG_PARAM_COUNT;
@@ -619,7 +619,7 @@ PHP_FUNCTION(sybase_select_db)
RETURN_FALSE;
}
convert_to_long(sybase_link_index);
- id = sybase_link_index->value.lval;
+ id = Z_LVAL_P(sybase_link_index);
break;
default:
WRONG_PARAM_COUNT;
@@ -636,7 +636,7 @@ PHP_FUNCTION(sybase_select_db)
convert_to_string(db);
- if (dbuse(sybase_ptr->link,db->value.str.val)==FAIL) {
+ if (dbuse(sybase_ptr->link,Z_STRVAL_P(db))==FAIL) {
/*php_error(E_WARNING,"Sybase: Unable to select database: %s",sybase_error(sybase));*/
RETURN_FALSE;
} else {
@@ -662,8 +662,8 @@ static void php_sybase_get_column_content(sybase_link *sybase_ptr,int offset,pva
{
case SYBINT2:
case SYBINT4: {
- result->value.lval = (long) anyintcol(offset);
- result->type = IS_LONG;
+ Z_LVAL_P(result) = (long) anyintcol(offset);
+ Z_TYPE_P(result) = IS_LONG;
break;
}
case SYBCHAR:
@@ -675,15 +675,15 @@ static void php_sybase_get_column_content(sybase_link *sybase_ptr,int offset,pva
while (length>0 && charcol(offset)[length-1] == ' ') { /* nuke trailing whitespace */
length--;
}
- result->value.str.val = estrndup(data,length);
- result->value.str.len = length;
- result->type = IS_STRING;
+ Z_STRVAL_P(result) = estrndup(data,length);
+ Z_STRLEN_P(result) = length;
+ Z_TYPE_P(result) = IS_STRING;
break;
}
/*case SYBFLT8:*/
case SYBREAL: {
- result->value.dval = (double) floatcol(offset);
- result->type = IS_DOUBLE;
+ Z_DVAL_P(result) = (double) floatcol(offset);
+ Z_TYPE_P(result) = IS_DOUBLE;
break;
}
default: {
@@ -720,9 +720,9 @@ static void php_sybase_get_column_content(sybase_link *sybase_ptr,int offset,pva
}
*(++p) = 0; /* put a trailing NULL */
- result->value.str.len = res_length;
- result->value.str.val = res_buf;
- result->type = IS_STRING;
+ Z_STRLEN_P(result) = res_length;
+ Z_STRVAL_P(result) = res_buf;
+ Z_TYPE_P(result) = IS_STRING;
} else {
php_error(E_WARNING,"Sybase: column %d has unknown data type (%d)", offset, coltype(offset));
ZVAL_FALSE(result);
@@ -757,7 +757,7 @@ PHP_FUNCTION(sybase_query)
RETURN_FALSE;
}
convert_to_long(sybase_link_index);
- id = sybase_link_index->value.lval;
+ id = Z_LVAL_P(sybase_link_index);
break;
default:
WRONG_PARAM_COUNT;
@@ -771,7 +771,7 @@ PHP_FUNCTION(sybase_query)
}
convert_to_string(query);
- if (dbcmd(sybase_ptr->link,query->value.str.val)==FAIL) {
+ if (dbcmd(sybase_ptr->link,Z_STRVAL_P(query))==FAIL) {
/*php_error(E_WARNING,"Sybase: Unable to set query");*/
RETURN_FALSE;
}
@@ -822,7 +822,7 @@ PHP_FUNCTION(sybase_query)
convert_to_string(cur_value);
if (PG(magic_quotes_runtime)) {
- cur_value->value.str.val = php_addslashes(cur_value->value.str.val, cur_value->value.str.len, &cur_value->value.str.len,0 TSRMLS_CC);
+ Z_STRVAL_P(cur_value) = php_addslashes(Z_STRVAL_P(cur_value), Z_STRLEN_P(cur_value), &Z_STRLEN_P(cur_value),0 TSRMLS_CC);
}
}
}
@@ -854,7 +854,7 @@ PHP_FUNCTION(sybase_query)
if (!result->fields[i].column_source) {
result->fields[i].column_source = empty_string;
}
- result->fields[i].type = column_types[i];
+ result->Z_TYPE(fields[i]) = column_types[i];
/* set numeric flag */
switch (column_types[i]) {
case SYBINT2:
@@ -871,8 +871,8 @@ PHP_FUNCTION(sybase_query)
}
}
efree(column_types);
- return_value->value.lval = zend_list_insert(result,php_sybase_module.le_result);
- return_value->type = IS_LONG;
+ Z_LVAL_P(return_value) = zend_list_insert(result,php_sybase_module.le_result);
+ Z_TYPE_P(return_value) = IS_LONG;
}
/* }}} */
@@ -890,16 +890,16 @@ PHP_FUNCTION(sybase_free_result)
}
convert_to_long(sybase_result_index);
- if (sybase_result_index->value.lval==0) {
+ if (Z_LVAL_P(sybase_result_index)==0) {
RETURN_FALSE;
}
- result = (sybase_result *) zend_list_find(sybase_result_index->value.lval,&type);
+ result = (sybase_result *) zend_list_find(Z_LVAL_P(sybase_result_index),&type);
if (type!=php_sybase_module.le_result) {
- php_error(E_WARNING,"%d is not a Sybase result index",sybase_result_index->value.lval);
+ php_error(E_WARNING,"%d is not a Sybase result index",Z_LVAL_P(sybase_result_index));
RETURN_FALSE;
}
- zend_list_delete(sybase_result_index->value.lval);
+ zend_list_delete(Z_LVAL_P(sybase_result_index));
RETURN_TRUE;
}
/* }}} */
@@ -927,7 +927,7 @@ PHP_FUNCTION(sybase_num_rows)
}
convert_to_long(result_index);
- id = result_index->value.lval;
+ id = Z_LVAL_P(result_index);
result = (sybase_result *) zend_list_find(id,&type);
if (type!=php_sybase_module.le_result) {
@@ -935,8 +935,8 @@ PHP_FUNCTION(sybase_num_rows)
RETURN_FALSE;
}
- return_value->value.lval = result->num_rows;
- return_value->type = IS_LONG;
+ Z_LVAL_P(return_value) = result->num_rows;
+ Z_TYPE_P(return_value) = IS_LONG;
}
/* }}} */
@@ -953,7 +953,7 @@ PHP_FUNCTION(sybase_num_fields)
}
convert_to_long(result_index);
- id = result_index->value.lval;
+ id = Z_LVAL_P(result_index);
result = (sybase_result *) zend_list_find(id,&type);
if (type!=php_sybase_module.le_result) {
@@ -961,8 +961,8 @@ PHP_FUNCTION(sybase_num_fields)
RETURN_FALSE;
}
- return_value->value.lval = result->num_fields;
- return_value->type = IS_LONG;
+ Z_LVAL_P(return_value) = result->num_fields;
+ Z_TYPE_P(return_value) = IS_LONG;
}
/* }}} */
@@ -980,7 +980,7 @@ PHP_FUNCTION(sybase_fetch_row)
}
convert_to_long(sybase_result_index);
- id = sybase_result_index->value.lval;
+ id = Z_LVAL_P(sybase_result_index);
result = (sybase_result *) zend_list_find(id,&type);
if (type!=php_sybase_module.le_result) {
@@ -995,7 +995,7 @@ PHP_FUNCTION(sybase_fetch_row)
array_init(return_value);
for (i=0; i<result->num_fields; i++) {
ZVAL_ADDREF(result->data[result->cur_row][i]);
- zend_hash_index_update(return_value->value.ht, i, (void *) &result->data[result->cur_row][i], sizeof(pval *), NULL);
+ zend_hash_index_update(Z_ARRVAL_P(return_value), i, (void *) &result->data[result->cur_row][i], sizeof(pval *), NULL);
}
result->cur_row++;
}
@@ -1014,10 +1014,10 @@ static void php_sybase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS)
}
convert_to_long(sybase_result_index);
- result = (sybase_result *) zend_list_find(sybase_result_index->value.lval,&type);
+ result = (sybase_result *) zend_list_find(Z_LVAL_P(sybase_result_index),&type);
if (type!=php_sybase_module.le_result) {
- php_error(E_WARNING,"%d is not a Sybase result index",sybase_result_index->value.lval);
+ php_error(E_WARNING,"%d is not a Sybase result index",Z_LVAL_P(sybase_result_index));
RETURN_FALSE;
}
@@ -1031,9 +1031,9 @@ static void php_sybase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS)
for (i=0; i<result->num_fields; i++) {
ZVAL_ADDREF(result->data[result->cur_row][i]);
- zend_hash_index_update(return_value->value.ht, i, (void *) &result->data[result->cur_row][i], sizeof(pval *), NULL);
+ zend_hash_index_update(Z_ARRVAL_P(return_value), i, (void *) &result->data[result->cur_row][i], sizeof(pval *), NULL);
ZVAL_ADDREF(result->data[result->cur_row][i]);
- zend_hash_update(return_value->value.ht, result->fields[i].name, strlen(result->fields[i].name)+1, (void *) &result->data[result->cur_row][i], sizeof(pval *), NULL);
+ zend_hash_update(Z_ARRVAL_P(return_value), result->fields[i].name, strlen(result->fields[i].name)+1, (void *) &result->data[result->cur_row][i], sizeof(pval *), NULL);
}
result->cur_row++;
}
@@ -1044,9 +1044,9 @@ static void php_sybase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(sybase_fetch_object)
{
php_sybase_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU);
- if (return_value->type==IS_ARRAY) {
- return_value->type=IS_OBJECT;
- Z_OBJPROP_P(return_value) = return_value->value.ht;
+ if (Z_TYPE_P(return_value)==IS_ARRAY) {
+ Z_TYPE_P(return_value)=IS_OBJECT;
+ Z_OBJPROP_P(return_value) = Z_ARRVAL_P(return_value);
Z_OBJCE_P(return_value) = &zend_standard_class_def;
}
}
@@ -1073,7 +1073,7 @@ PHP_FUNCTION(sybase_data_seek)
}
convert_to_long(sybase_result_index);
- id = sybase_result_index->value.lval;
+ id = Z_LVAL_P(sybase_result_index);
result = (sybase_result *) zend_list_find(id,&type);
if (type!=php_sybase_module.le_result) {
@@ -1082,12 +1082,12 @@ PHP_FUNCTION(sybase_data_seek)
}
convert_to_long(offset);
- if (offset->value.lval<0 || offset->value.lval>=result->num_rows) {
+ if (Z_LVAL_P(offset)<0 || Z_LVAL_P(offset)>=result->num_rows) {
php_error(E_WARNING,"Sybase: Bad row offset");
RETURN_FALSE;
}
- result->cur_row = offset->value.lval;
+ result->cur_row = Z_LVAL_P(offset);
RETURN_TRUE;
}
/* }}} */
@@ -1159,7 +1159,7 @@ PHP_FUNCTION(sybase_fetch_field)
RETURN_FALSE;
}
convert_to_long(offset);
- field_offset = offset->value.lval;
+ field_offset = Z_LVAL_P(offset);
break;
default:
WRONG_PARAM_COUNT;
@@ -1167,7 +1167,7 @@ PHP_FUNCTION(sybase_fetch_field)
}
convert_to_long(sybase_result_index);
- id = sybase_result_index->value.lval;
+ id = Z_LVAL_P(sybase_result_index);
result = (sybase_result *) zend_list_find(id,&type);
if (type!=php_sybase_module.le_result) {
@@ -1194,7 +1194,7 @@ PHP_FUNCTION(sybase_fetch_field)
add_property_long(return_value, "max_length",result->fields[field_offset].max_length);
add_property_string(return_value, "column_source",result->fields[field_offset].column_source, 1);
add_property_long(return_value, "numeric", result->fields[field_offset].numeric);
- add_property_string(return_value, "type", php_sybase_get_field_name(result->fields[field_offset].type), 1);
+ add_property_string(return_value, "type", php_sybase_get_field_name(result->Z_TYPE(fields[field_offset])), 1);
}
/* }}} */
@@ -1211,7 +1211,7 @@ PHP_FUNCTION(sybase_field_seek)
}
convert_to_long(sybase_result_index);
- id = sybase_result_index->value.lval;
+ id = Z_LVAL_P(sybase_result_index);
result = (sybase_result *) zend_list_find(id,&type);
if (type!=php_sybase_module.le_result) {
@@ -1220,7 +1220,7 @@ PHP_FUNCTION(sybase_field_seek)
}
convert_to_long(offset);
- field_offset = offset->value.lval;
+ field_offset = Z_LVAL_P(offset);
if (field_offset<0 || field_offset >= result->num_fields) {
php_error(E_WARNING,"Sybase: Bad column offset");
@@ -1246,7 +1246,7 @@ PHP_FUNCTION(sybase_result)
}
convert_to_long(sybase_result_index);
- id = sybase_result_index->value.lval;
+ id = Z_LVAL_P(sybase_result_index);
result = (sybase_result *) zend_list_find(id,&type);
if (type!=php_sybase_module.le_result) {
@@ -1255,30 +1255,30 @@ PHP_FUNCTION(sybase_result)
}
convert_to_long(row);
- if (row->value.lval<0 || row->value.lval>=result->num_rows) {
- php_error(E_WARNING,"Sybase: Bad row offset (%d)",row->value.lval);
+ if (Z_LVAL_P(row)<0 || Z_LVAL_P(row)>=result->num_rows) {
+ php_error(E_WARNING,"Sybase: Bad row offset (%d)",Z_LVAL_P(row));
RETURN_FALSE;
}
- switch(field->type) {
+ switch(Z_TYPE_P(field)) {
case IS_STRING: {
int i;
for (i=0; i<result->num_fields; i++) {
- if (!strcasecmp(result->fields[i].name,field->value.str.val)) {
+ if (!strcasecmp(result->fields[i].name,Z_STRVAL_P(field))) {
field_offset = i;
break;
}
}
if (i>=result->num_fields) { /* no match found */
- php_error(E_WARNING,"Sybase: %s field not found in result",field->value.str.val);
+ php_error(E_WARNING,"Sybase: %s field not found in result",Z_STRVAL_P(field));
RETURN_FALSE;
}
break;
}
default:
convert_to_long(field);
- field_offset = field->value.lval;
+ field_offset = Z_LVAL_P(field);
if (field_offset<0 || field_offset>=result->num_fields) {
php_error(E_WARNING,"Sybase: Bad column offset specified");
RETURN_FALSE;
@@ -1286,7 +1286,7 @@ PHP_FUNCTION(sybase_result)
break;
}
- *return_value = *result->data[row->value.lval][field_offset];
+ *return_value = *result->Z_LVAL_P(data[row)][field_offset];
pval_copy_constructor(return_value);
}
/* }}} */
@@ -1317,7 +1317,7 @@ PHP_FUNCTION(sybase_affected_rows)
}
convert_to_long(sybase_link_index);
- id = sybase_link_index->value.lval;
+ id = Z_LVAL_P(sybase_link_index);
}
break;
@@ -1336,8 +1336,8 @@ PHP_FUNCTION(sybase_affected_rows)
RETURN_FALSE;
}
- return_value->value.lval = DBCOUNT(sybase_ptr->link);
- return_value->type = IS_LONG;
+ Z_LVAL_P(return_value) = DBCOUNT(sybase_ptr->link);
+ Z_TYPE_P(return_value) = IS_LONG;
}
@@ -1381,7 +1381,7 @@ PHP_FUNCTION(sybase_min_error_severity)
WRONG_PARAM_COUNT;
}
convert_to_long(severity);
- php_sybase_module.min_error_severity = severity->value.lval;
+ php_sybase_module.min_error_severity = Z_LVAL_P(severity);
}
/* }}} */
@@ -1395,7 +1395,7 @@ PHP_FUNCTION(sybase_min_message_severity)
WRONG_PARAM_COUNT;
}
convert_to_long(severity);
- php_sybase_module.min_message_severity = severity->value.lval;
+ php_sybase_module.min_message_severity = Z_LVAL_P(severity);
}
/* }}} */