cvs commit
| From: | thies | Date: | Mon, 05 Jul 1999 02:29:04 +0000 |
| Subject: | cvs commit | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-1887@lists.php.net to get a copy of this message | ||
From: thies
Date: Mon Jul 5 02:29:04 1999
Modified files:
php4/ext/oci8/oci8.c
Log message:
up to php3 version
returns resources now!
Index: php4/ext/oci8/oci8.c
diff -u php4/ext/oci8/oci8.c:1.5 php4/ext/oci8/oci8.c:1.6
--- php4/ext/oci8/oci8.c:1.5 Wed Jun 9 15:47:03 1999
+++ php4/ext/oci8/oci8.c Mon Jul 5 02:29:04 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.5 1999/06/09 19:47:03 thies Exp $ */
+/* $Id: oci8.c,v 1.6 1999/07/05 06:29:04 thies Exp $ */
/* TODO list:
*
@@ -98,6 +98,11 @@
#endif
#include "snprintf.h"
+#if PHP_API_VERSION >= 19990421
+#define php3tls_pval_destructor(a) zval_dtor(a)
+#endif
+
+
/* }}} */
/* {{{ thread safety stuff */
@@ -952,12 +957,8 @@
/* this seems to be a BUG in oracle with 1-digit numbers */
if (column->rlen <= 0) {
- if (column->indicator > 0) { /* XXX this is our "oci-bug" */
- /*
- size = column->indicator;
- */
-
- size = 1;
+ if (column->size2 > 0) { /* XXX this is our "oci-bug" */
+ size = column->size2;
} else {
size = 1;
}
@@ -1122,6 +1123,10 @@
statement->conn->session->server->open = 0;
return 0;
break;
+
+ default:
+ return 0;
+ break;
}
}
@@ -1377,13 +1382,8 @@
continue;
}
-#if PHP_API_VERSION < 19990421
php3tls_pval_destructor(column->define->pval);
-#else
- pval_destructor(column->define->pval);
-#endif
-
oci8_make_pval(column->define->pval,statement,column,"OCIFetch",0);
}
@@ -2292,8 +2292,8 @@
oci8_debug("oci8_do_connect: id=%d",connection->id);
- RETURN_LONG(connection->id);
-
+ RETURN_RESOURCE(connection->id);
+
CLEANUP:
oci8_debug("oci8_do_connect: FAILURE -> CLEANUP called");
@@ -3146,17 +3146,13 @@
php3_error(E_WARNING, "OCIFetchInto: unable to convert arg 2 to array");
RETURN_FALSE;
}
-
-/*
- array->is_ref = 0;
- array->refcount = 1;
-*/
}
#if PHP_API_VERSION < 19990421
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... */
@@ -3169,8 +3165,6 @@
#if PHP_API_VERSION >= 19990421
element = emalloc(sizeof(pval));
- element->is_ref = 0;
- element->refcount = 1;
#endif
if ((mode & OCI_NUM) || (! (mode & OCI_ASSOC))) { /* OCI_NUM is default */
@@ -3522,7 +3516,7 @@
RETURN_FALSE;
}
- RETURN_LONG(oci8_parse(connection,
+ RETURN_RESOURCE(oci8_parse(connection,
query->value.str.val,
query->value.str.len,
list));