Skip to content

Commit 10ff16d

Browse files
committed
MFH: Make non-public prototype match the type passed at call
1 parent f346405 commit 10ff16d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ext/oci8/oci8_statement.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ int php_oci_bind_post_exec(void *data TSRMLS_DC)
883883

884884
/* {{{ php_oci_bind_by_name()
885885
Bind zval to the given placeholder */
886-
int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len, zval* var, long maxlength, long type TSRMLS_DC)
886+
int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len, zval* var, long maxlength, ub2 type TSRMLS_DC)
887887
{
888888
php_oci_collection *bind_collection = NULL;
889889
php_oci_descriptor *bind_descriptor = NULL;
@@ -975,7 +975,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
975975
break;
976976

977977
default:
978-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown or unsupported datatype given: %ld", type);
978+
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown or unsupported datatype given: %d", (int)type);
979979
return 1;
980980
break;
981981
}
@@ -1008,14 +1008,14 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
10081008
PHP_OCI_CALL_RETURN(statement->errcode,
10091009
OCIBindByName,
10101010
(
1011-
statement->stmt, /* statement handle */
1012-
(OCIBind **)&bindp->bind, /* bind hdl (will alloc) */
1013-
statement->err, /* error handle */
1011+
statement->stmt, /* statement handle */
1012+
(OCIBind **)&bindp->bind, /* bind hdl (will alloc) */
1013+
statement->err, /* error handle */
10141014
(text*) name, /* placeholder name */
10151015
name_len, /* placeholder length */
10161016
(dvoid *)bind_data, /* in/out data */
10171017
value_sz, /* PHP_OCI_MAX_DATA_SIZE, */ /* max size of input/output data */
1018-
(ub2)type, /* in/out data type */
1018+
type, /* in/out data type */
10191019
(dvoid *)&bindp->indicator, /* indicator (ignored) */
10201020
(ub2 *)0, /* size array (ignored) */
10211021
(ub2 *)&bindp->retcode, /* return code (ignored) */

ext/oci8/php_oci8_int.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ int php_oci_statement_cancel (php_oci_statement * TSRMLS_DC);
441441
void php_oci_statement_free (php_oci_statement * TSRMLS_DC);
442442
int php_oci_bind_pre_exec(void *data TSRMLS_DC);
443443
int php_oci_bind_post_exec(void *data TSRMLS_DC);
444-
int php_oci_bind_by_name(php_oci_statement *, char *, int, zval*, long, long TSRMLS_DC);
444+
int php_oci_bind_by_name(php_oci_statement *, char *, int, zval*, long, ub2 TSRMLS_DC);
445445
sb4 php_oci_bind_in_callback(dvoid *, OCIBind *, ub4, ub4, dvoid **, ub4 *, ub1 *, dvoid **);
446446
sb4 php_oci_bind_out_callback(dvoid *, OCIBind *, ub4, ub4, dvoid **, ub4 **, ub1 *, dvoid **, ub2 **);
447447
php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAMETERS, int need_data);

0 commit comments

Comments
 (0)