cvs: /php4/ext/oracle oracle.c
| From: | Thies C. Arntzen | Date: | Tue, 18 Jan 2000 08:36:25 +0000 |
| Subject: | cvs: /php4/ext/oracle oracle.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-9218@lists.php.net to get a copy of this message | ||
thies Tue Jan 18 00:36:25 2000 EDT
Modified files:
/php4/ext/oracle oracle.c
Log:
@- Ora_GetColumn()/Ora_FetchInto() now return NULL for NULL-Columns. (Thies)
also changed return-type for list-dtor
Index: php4/ext/oracle/oracle.c
diff -u php4/ext/oracle/oracle.c:1.32 php4/ext/oracle/oracle.c:1.33
--- php4/ext/oracle/oracle.c:1.32 Fri Dec 31 17:31:45 1999
+++ php4/ext/oracle/oracle.c Tue Jan 18 00:35:54 2000
@@ -36,7 +36,7 @@
#if HAVE_ORACLE
#include "php_oracle.h"
-#define HASH_DTOR (int (*)(void *))
+#define HASH_DTOR (void (*)(void *))
#ifdef WIN32
# include "variables.h"
@@ -207,13 +207,12 @@
return 1;
}
-static int
+static void
pval_ora_param_destructor(oraParam *param)
{
if (param->progv) {
efree(param->progv);
}
- return 1;
}
@@ -1112,9 +1111,7 @@
continue; /* don't add anything for NULL columns, unless the calles wants it */
} else {
MAKE_STD_ZVAL(tmp);
-
- tmp->type = IS_BOOL; /* return false for NULL columns */
- tmp->value.lval = 0;
+ ZVAL_NULL(tmp);
}
} else if (cursor->columns[i].col_retcode != 0 &&
cursor->columns[i].col_retcode != 1406) {
@@ -1386,6 +1383,10 @@
column = &cursor->columns[colno];
type = column->dbtype;
+
+ if (column->col_retcode == 1405) {
+ RETURN_NULL;
+ }
if (column->col_retcode != 0 && column->col_retcode != 1406) {
/* So error fetching column. The most common is 1405, a NULL