]> granicus.if.org Git - php/commitdiff
MFH: Make non-public prototype match the type passed at call
authorChristopher Jones <sixd@php.net>
Mon, 9 Mar 2009 20:58:51 +0000 (20:58 +0000)
committerChristopher Jones <sixd@php.net>
Mon, 9 Mar 2009 20:58:51 +0000 (20:58 +0000)
ext/oci8/oci8_statement.c
ext/oci8/php_oci8_int.h

index ef8ca3c41a1eaefa3ea5f39e2736dd417f25d795..7a2336c618bd66786dbe84cd409d5fc21b9ef853 100644 (file)
@@ -883,7 +883,7 @@ int php_oci_bind_post_exec(void *data TSRMLS_DC)
 
 /* {{{ php_oci_bind_by_name()
  Bind zval to the given placeholder */
-int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len, zval* var, long maxlength, long type TSRMLS_DC)
+int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len, zval* var, long maxlength, ub2 type TSRMLS_DC)
 {
        php_oci_collection *bind_collection = NULL;
        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,
                        break;
 
                default:
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown or unsupported datatype given: %ld", type);
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown or unsupported datatype given: %d", (int)type);
                        return 1;
                        break;
        }
@@ -1008,14 +1008,14 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
        PHP_OCI_CALL_RETURN(statement->errcode,
                OCIBindByName,
                (
-                       statement->stmt,                                /* statement handle */
-                       (OCIBind **)&bindp->bind,               /* bind hdl (will alloc) */
-                       statement->err,                           /* error handle */
+                       statement->stmt,                                 /* statement handle */
+                       (OCIBind **)&bindp->bind,                /* bind hdl (will alloc) */
+                       statement->err,                                  /* error handle */
                        (text*) name,                                    /* placeholder name */                                 
                        name_len,                                                /* placeholder length */
                        (dvoid *)bind_data,                              /* in/out data */
                        value_sz, /* PHP_OCI_MAX_DATA_SIZE, */ /* max size of input/output data */
-                       (ub2)type,                                               /* in/out data type */
+                       type,                                                    /* in/out data type */
                        (dvoid *)&bindp->indicator,              /* indicator (ignored) */
                        (ub2 *)0,                                                /* size array (ignored) */
                        (ub2 *)&bindp->retcode,                  /* return code (ignored) */
index 7681d4b7a196a487f22ead15e78da09de1036b5f..636191f46e62511ea5c17282a805a67f57095876 100644 (file)
@@ -441,7 +441,7 @@ int php_oci_statement_cancel (php_oci_statement * TSRMLS_DC);
 void php_oci_statement_free (php_oci_statement * TSRMLS_DC);
 int php_oci_bind_pre_exec(void *data TSRMLS_DC);
 int php_oci_bind_post_exec(void *data TSRMLS_DC);
-int php_oci_bind_by_name(php_oci_statement *, char *, int, zval*, long, long TSRMLS_DC);
+int php_oci_bind_by_name(php_oci_statement *, char *, int, zval*, long, ub2 TSRMLS_DC);
 sb4 php_oci_bind_in_callback(dvoid *, OCIBind *, ub4, ub4, dvoid **, ub4 *, ub1 *, dvoid **);
 sb4 php_oci_bind_out_callback(dvoid *, OCIBind *, ub4, ub4, dvoid **, ub4 **, ub1 *, dvoid **, ub2 **);
 php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAMETERS, int need_data);