cvs commit

From: Date: Mon, 12 Jul 1999 07:51:41 +0000
Subject: cvs commit
Groups: php.dev 
Request: Send a blank email to php-dev+get-8385@lists.php.net to get a copy of this message
From: thies Date: Mon Jul 12 07:51:41 1999 Modified files: php3/functions/oci8.c Log message: par with 4.0 Index: php3/functions/oci8.c diff -u php3/functions/oci8.c:1.114 php3/functions/oci8.c:1.115 --- php3/functions/oci8.c:1.114 Mon Jul 12 06:34:36 1999 +++ php3/functions/oci8.c Mon Jul 12 07:51:41 1999 @@ -33,7 +33,7 @@ #define OCI8_USE_EMALLOC 0 /* set this to 1 if you want to use the php memory manager! */ -/* $Id: oci8.c,v 1.114 1999/07/12 10:34:36 thies Exp $ */ +/* $Id: oci8.c,v 1.115 1999/07/12 11:51:41 thies Exp $ */ /* TODO list: * @@ -2538,7 +2538,7 @@ #if PHP_API_VERSION < 19990421 if (getThis(&id) == SUCCESS) { #else - if (id = getThis()) { + if ((id = getThis()) != 0) { #endif if (_php3_hash_find(id->value.ht, "connection", sizeof("connection"), (void **)&conn) == FAILURE) { php3_error(E_WARNING, "unable to find my statement property"); @@ -2581,7 +2581,7 @@ #if PHP_API_VERSION < 19990421 if (getThis(&id) == SUCCESS) { #else - if (id = getThis()) { + if ((id = getThis()) != 0) { #endif if (_php3_hash_find(id->value.ht, "connection", sizeof("connection"), (void **)&conn) == FAILURE) { php3_error(E_WARNING, "unable to find my statement property"); @@ -2665,7 +2665,7 @@ #if PHP_API_VERSION < 19990421 if (getThis(&id) == SUCCESS) { #else - if (id = getThis()) { + if ((id = getThis()) != 0) { #endif if (_php3_hash_find(id->value.ht, "connection", sizeof("connection"), (void **)&conn) == FAILURE) { php3_error(E_WARNING, "unable to find my statement property"); @@ -3159,7 +3159,6 @@ element = emalloc(sizeof(pval)); #endif - for (i = 0; i < statement->ncolumns; i++) { column = oci8_get_col(statement, i + 1, 0, "OCIFetchInto"); if (column == NULL) { /* should not happen... */ @@ -3170,15 +3169,13 @@ continue; } + if ((mode & OCI_NUM) || (! (mode & OCI_ASSOC))) { /* OCI_NUM is default */ #if PHP_API_VERSION >= 19990421 - element = emalloc(sizeof(pval)); + MAKE_STD_ZVAL(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 - 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); @@ -3186,10 +3183,12 @@ } if (mode & OCI_ASSOC) { +#if PHP_API_VERSION >= 19990421 + MAKE_STD_ZVAL(element); +#endif oci8_make_pval(element,statement,column, "OCIFetchInto",mode); #if PHP_API_VERSION >= 19990421 - INIT_PZVAL(element); _php3_hash_update(array->value.ht, column->name, column->name_len+1, (void *)&element, sizeof(pval*), NULL); #else _php3_hash_update(array->value.ht, column->name, column->name_len+1, (void *)element, sizeof(pval), NULL); @@ -3261,16 +3260,11 @@ columns[ i ] = oci8_get_col(statement, i + 1, 0, "OCIFetchStatement"); #if PHP_API_VERSION >= 19990421 - tmp = emalloc(sizeof(pval)); - INIT_PZVAL(tmp); + MAKE_STD_ZVAL(tmp); #endif array_init(tmp); -#if PHP_API_VERSION >= 19990421 - INIT_PZVAL(tmp); -#endif - memcpy(namebuf,columns[ i ]->name, columns[ i ]->name_len); namebuf[ columns[ i ]->name_len ] = 0; @@ -3292,15 +3286,13 @@ while (oci8_fetch(statement, nrows, "OCIFetchStatement")) { for (i = 0; i < statement->ncolumns; i++) { #if PHP_API_VERSION >= 19990421 - element = emalloc(sizeof(pval)); + MAKE_STD_ZVAL(element); #endif - oci8_make_pval(element,statement,columns[ i ], "OCIFetchStatement",OCI_RETURN_LOBS); #if PHP_API_VERSION < 19990421 _php3_hash_index_update(outarrs[ i ]->value.ht, rows, (void *)element, sizeof(pval), NULL); #else - INIT_PZVAL(element); _php3_hash_index_update((*(outarrs[ i ]))->value.ht, rows, (void *)&element, sizeof(pval*), NULL); #endif }

« previous php.dev (#8385) next »