#endif
#include "snprintf.h"
+#if PHP_API_VERSION >= 19990421
+#define php3tls_pval_destructor(a) zval_dtor(a)
+#endif
+
+
/* }}} */
/* {{{ thread safety stuff */
/* 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;
}
statement->conn->session->server->open = 0;
return 0;
break;
+
+ default:
+ return 0;
+ break;
}
}
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);
}
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");
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... */
#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 */
RETURN_FALSE;
}
- RETURN_LONG(oci8_parse(connection,
+ RETURN_RESOURCE(oci8_parse(connection,
query->value.str.val,
query->value.str.len,
list));