summaryrefslogtreecommitdiff
path: root/ext/oracle/oracle.c
diff options
context:
space:
mode:
authorThies C. Arntzen <thies@php.net>2000-01-18 08:35:55 +0000
committerThies C. Arntzen <thies@php.net>2000-01-18 08:35:55 +0000
commitc6df8ab565a12326173cb5ac16c4378bb928a704 (patch)
treefe3fecfd805858e83594a2a99ddb974a5fada189 /ext/oracle/oracle.c
parentdf138c2e2f56246607171fcef85dcf4ab64da9b5 (diff)
downloadphp-git-c6df8ab565a12326173cb5ac16c4378bb928a704.tar.gz
@- Ora_GetColumn()/Ora_FetchInto() now return NULL for NULL-Columns. (Thies)
also changed return-type for list-dtor
Diffstat (limited to 'ext/oracle/oracle.c')
-rw-r--r--ext/oracle/oracle.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/ext/oracle/oracle.c b/ext/oracle/oracle.c
index 5a5b260a81..1b132dd5ff 100644
--- a/ext/oracle/oracle.c
+++ b/ext/oracle/oracle.c
@@ -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 @@ static int _close_oraconn(oraConnection *conn)
return 1;
}
-static int
+static void
pval_ora_param_destructor(oraParam *param)
{
if (param->progv) {
efree(param->progv);
}
- return 1;
}
@@ -1112,9 +1111,7 @@ PHP_FUNCTION(ora_fetch_into)
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) {
@@ -1387,6 +1384,10 @@ PHP_FUNCTION(ora_getcolumn)
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
* was retreived. 1406 is ASCII or string buffer data was