summaryrefslogtreecommitdiff
path: root/ext/oci8/oci8.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-07-09 20:45:55 +0000
committerZeev Suraski <zeev@php.net>1999-07-09 20:45:55 +0000
commitc43c235427418d610f749b97d4a1228b0191a7ed (patch)
tree0c3cd7d5242e2dd0413bcd1e5919067e04bdd72a /ext/oci8/oci8.c
parent2a6da7814c27a7e851c8c7a883441ae9d34cd95c (diff)
downloadphp-git-c43c235427418d610f749b97d4a1228b0191a7ed.tar.gz
Don't touch refcount and EA directly
Diffstat (limited to 'ext/oci8/oci8.c')
-rw-r--r--ext/oci8/oci8.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index d2549ffaad..e8685e908f 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -3166,15 +3166,13 @@ PHP_FUNCTION(oci8_fetchinto)
#if PHP_API_VERSION >= 19990421
element = emalloc(sizeof(pval));
- element->EA=0;
- element->refcount=1;
+ INIT_PZVAL(element);
#endif
if ((mode & OCI_NUM) || (! (mode & OCI_ASSOC))) { /* OCI_NUM is default */
oci8_make_pval(element,statement,column, "OCIFetchInto",mode);
#if PHP_API_VERSION >= 19990421
- element->EA = 0;
- element->refcount = 1;
+ INIT_PZVAL(element);
_php3_hash_index_update(array->value.ht, i, (void *)&element, sizeof(pval*), NULL);
#else
_php3_hash_index_update(array->value.ht, i, (void *)element, sizeof(pval), NULL);
@@ -3257,15 +3255,13 @@ PHP_FUNCTION(oci8_fetchstatement)
#if PHP_API_VERSION >= 19990421
tmp = emalloc(sizeof(pval));
- tmp->EA = 0;
- tmp->refcount = 1;
+ INIT_PZVAL(tmp);
#endif
array_init(tmp);
#if PHP_API_VERSION >= 19990421
- tmp->EA = 0;
- tmp->refcount = 1;
+ INIT_PZVAL(tmp);
#endif
memcpy(namebuf,columns[ i ]->name, columns[ i ]->name_len);
@@ -3297,8 +3293,7 @@ PHP_FUNCTION(oci8_fetchstatement)
#if PHP_API_VERSION < 19990421
_php3_hash_index_update(outarrs[ i ]->value.ht, rows, (void *)element, sizeof(pval), NULL);
#else
- element->refcount = 1;
- element->EA = 0;
+ INIT_PZVAL(element);
_php3_hash_index_update((*(outarrs[ i ]))->value.ht, rows, (void *)&element, sizeof(pval*), NULL);
#endif
}