CVS update: php3/functions
| From: | thies | Date: | Tue, 16 Feb 1999 12:52:58 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-4120@lists.php.net to get a copy of this message | ||
Date: Tuesday February 16, 1999 @ 7:52
Author: thies
Update of /repository/php3/functions
In directory asf:/u/temp/cvs-serv6867/functions
Modified Files:
oci8.c
Log Message:
"tiny" "!=" <=> "=!" mixing....
...small ROWID fixes
Index: php3/functions/oci8.c
diff -c php3/functions/oci8.c:1.48 php3/functions/oci8.c:1.49
*** php3/functions/oci8.c:1.48 Tue Feb 16 06:57:51 1999
--- php3/functions/oci8.c Tue Feb 16 07:52:58 1999
***************
*** 32,38 ****
+----------------------------------------------------------------------+
*/
! /* $Id: oci8.c,v 1.48 1999/02/16 11:57:51 thies Exp $ */
#include "php.h"
#include "internal_functions.h"
--- 32,38 ----
+----------------------------------------------------------------------+
*/
! /* $Id: oci8.c,v 1.49 1999/02/16 12:52:58 thies Exp $ */
#include "php.h"
#include "internal_functions.h"
***************
*** 185,192 ****
/* }}} */
/* {{{ extension definition structures */
- static unsigned char refs_aaf[] = {3, BYREF_ALLOW, BYREF_ALLOW, BYREF_FORCE};
-
#define OCI_ASSOC 1<<0
#define OCI_NUM 1<<1
#define OCI_BOTH (OCI_ASSOC|OCI_NUM)
--- 185,190 ----
***************
*** 195,208 ****
#define OCI_RETURN_LOBS 1<<3
function_entry oci8_functions[] = {
! {"ocibindbyname", php3_oci8_bindbyname, refs_aaf},
{"ocicolumnisnull", php3_oci8_columnisnull, NULL},
{"ocicolumnname", php3_oci8_columnname, NULL},
{"ocicolumnsize", php3_oci8_columnsize, NULL},
{"ocicolumntype", php3_oci8_columntype, NULL},
{"ociexecute", php3_oci8_execute, NULL},
{"ocifetch", php3_oci8_fetch, NULL},
! {"ocifetchinto", php3_oci8_fetchinto, second_arg_force_ref},
{"ocifreestatement", php3_oci8_freestatement, NULL},
{"ociinternaldebug", php3_oci8_internaldebug, NULL},
{"ocinumcols", php3_oci8_numcols, NULL},
--- 193,206 ----
#define OCI_RETURN_LOBS 1<<3
function_entry oci8_functions[] = {
! {"ocibindbyname", php3_oci8_bindbyname, NULL},
{"ocicolumnisnull", php3_oci8_columnisnull, NULL},
{"ocicolumnname", php3_oci8_columnname, NULL},
{"ocicolumnsize", php3_oci8_columnsize, NULL},
{"ocicolumntype", php3_oci8_columntype, NULL},
{"ociexecute", php3_oci8_execute, NULL},
{"ocifetch", php3_oci8_fetch, NULL},
! {"ocifetchinto", php3_oci8_fetchinto, NULL},
{"ocifreestatement", php3_oci8_freestatement, NULL},
{"ociinternaldebug", php3_oci8_internaldebug, NULL},
{"ocinumcols", php3_oci8_numcols, NULL},
***************
*** 311,316 ****
--- 309,315 ----
/* for OCINewDescriptor */
REGISTER_LONG_CONSTANT("OCI_DTYPE_FILE",OCI_DTYPE_FILE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("OCI_DTYPE_LOB",OCI_DTYPE_LOB, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_DTYPE_ROWID",OCI_DTYPE_ROWID, CONST_CS | CONST_PERSISTENT);
return SUCCESS;
}
***************
*** 674,680 ****
statement = oci8_get_stmt(stmt_ind, "oci8_make_pval", list);
if (column->is_descr) {
! if ((column->type =! SQLT_RDD) && (mode & OCI_RETURN_LOBS)) {
/* OCI_RETURN_LOBS means that we want the content of the LOB back instead of the locator */
if (column->indicator == -1) { /* we hit a NULL value, return empty string or uninitialized
value */
--- 673,679 ----
statement = oci8_get_stmt(stmt_ind, "oci8_make_pval", list);
if (column->is_descr) {
! if ((column->type != SQLT_RDD) && (mode & OCI_RETURN_LOBS)) {
/* OCI_RETURN_LOBS means that we want the content of the LOB back instead of the locator */
if (column->indicator == -1) { /* we hit a NULL value, return empty string or uninitialized
value */
***************
*** 710,716 ****
add_property_long(value, "connection", statement->conn->id);
add_property_long(value, "descriptor", (long) column->data);
! if (column->type =! SQLT_RDD) {
add_method(value, "save", php3_oci8_savelob);
add_method(value, "load", php3_oci8_loadlob);
}
--- 709,715 ----
add_property_long(value, "connection", statement->conn->id);
add_property_long(value, "descriptor", (long) column->data);
! if (column->type != SQLT_RDD) {
add_method(value, "save", php3_oci8_savelob);
add_method(value, "load", php3_oci8_loadlob);
}
***************
*** 983,989 ****
--- 982,990 ----
error = OCIStmtFetch(statement->pStmt, statement->pError, nrows,
OCI_FETCH_NEXT, OCI_DEFAULT);
+ /*
oci8_debug("OCIStmtFetch returned %d", error);
+ */
if (error == OCI_NO_DATA) {
return 0;
***************
*** 1217,1237 ****
sb4 ocimaxlen;
dvoid *mydescr = 0;
! ocitype = SQLT_STR;
if (getParameters(ht, 5, &stmt, &name, &var, &maxlen,&type) == SUCCESS) {
!
! convert_to_long(type); ocitype = type->value.lval;
! convert_to_long(maxlen); ocimaxlen = maxlen->value.lval;
!
} else if (getParameters(ht, 4, &stmt, &name, &var, &maxlen) == SUCCESS) {
-
convert_to_long(maxlen); ocimaxlen = maxlen->value.lval;
-
} else {
WRONG_PARAM_COUNT;
}
statement = oci8_get_stmt(stmt->value.lval, "OCIBindByName", list);
if (statement == NULL) {
RETURN_FALSE;
--- 1218,1241 ----
sb4 ocimaxlen;
dvoid *mydescr = 0;
! ocitype = SQLT_STR; /* zero terminated string */
if (getParameters(ht, 5, &stmt, &name, &var, &maxlen,&type) == SUCCESS) {
! convert_to_long(type);
! ocitype = type->value.lval;
! convert_to_long(maxlen);
! ocimaxlen = maxlen->value.lval;
} else if (getParameters(ht, 4, &stmt, &name, &var, &maxlen) == SUCCESS) {
convert_to_long(maxlen); ocimaxlen = maxlen->value.lval;
} else {
WRONG_PARAM_COUNT;
}
+ if (!ParameterPassedByReference(ht, 3)) {
+ php3_error(E_WARNING, "OCIBindByName: arg 3 must be passed by reference");
+ RETURN_FALSE;
+ }
+
statement = oci8_get_stmt(stmt->value.lval, "OCIBindByName", list);
if (statement == NULL) {
RETURN_FALSE;
***************
*** 1852,1857 ****
--- 1856,1867 ----
} else if (getParameters(ht, 2, &stmt, &array) == FAILURE) {
WRONG_PARAM_COUNT;
}
+
+ if (!ParameterPassedByReference(ht, 2)) {
+ php3_error(E_WARNING, "OCIFetchInto: arg 2 must be passed by reference");
+ RETURN_FALSE;
+ }
+
convert_to_long(stmt);
statement = oci8_get_stmt(stmt->value.lval, "OCIFetchInto", list);
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net