From 238cdaa0d598cbfd9b04d8d3dd25a049743395c0 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 8 Oct 2020 23:31:59 +0200 Subject: [PATCH 1/5] Update ext/odbc parameter names --- ext/odbc/odbc.stub.php | 170 ++++++++++++++++++++-------------------- ext/odbc/odbc_arginfo.h | 100 +++++++++++------------ 2 files changed, 135 insertions(+), 135 deletions(-) diff --git a/ext/odbc/odbc.stub.php b/ext/odbc/odbc.stub.php index a20e22fa3209e..cabcb0df0b349 100644 --- a/ext/odbc/odbc.stub.php +++ b/ext/odbc/odbc.stub.php @@ -4,67 +4,67 @@ function odbc_close_all(): void {} -/** @param resource $result_id */ -function odbc_binmode($result_id, int $mode): bool {} +/** @param resource $stmt */ +function odbc_binmode($stmt, int $mode): bool {} -/** @param resource $result_id */ -function odbc_longreadlen($result_id, int $length): bool {} +/** @param resource $stmt */ +function odbc_longreadlen($stmt, int $length): bool {} /** - * @param resource $connection_id + * @param resource $odbc * @return resource|false */ -function odbc_prepare($connection_id, string $query) {} +function odbc_prepare($odbc, string $query) {} -/** @param resource $result_id */ -function odbc_execute($result_id, array $parameters_array = []): bool {} +/** @param resource $stmt */ +function odbc_execute($stmt, array $params = []): bool {} -/** @param resource $result_id */ -function odbc_cursor($result_id): string|false {} +/** @param resource $stmt */ +function odbc_cursor($stmt): string|false {} #ifdef HAVE_SQLDATASOURCES -/** @param resource $connection_id */ -function odbc_data_source($connection_id, int $fetch_type): array|false {} +/** @param resource $odbc */ +function odbc_data_source($odbc, int $fetch_type): array|false {} #endif /** - * @param resource $connection_id + * @param resource $odbc * @return resource|false */ -function odbc_exec($connection_id, string $query) {} +function odbc_exec($odbc, string $query) {} /** - * @param resource $connection_id + * @param resource $odbc * @return resource|false * @alias odbc_exec */ -function odbc_do($connection_id, string $query) {} +function odbc_do($odbc, string $query) {} #ifdef PHP_ODBC_HAVE_FETCH_HASH -/** @param resource $result */ -function odbc_fetch_object($result, int $rownumber = -1): stdClass|false {} +/** @param resource $stmt */ +function odbc_fetch_object($stmt, int $row_number = -1): stdClass|false {} -/** @param resource $result */ -function odbc_fetch_array($result, int $rownumber = -1): array|false {} +/** @param resource $stmt */ +function odbc_fetch_array($stmt, int $row_number = -1): array|false {} #endif /** - * @param resource $result_id - * @param array $result_array + * @param resource $stmt + * @param array $row */ -function odbc_fetch_into($result_id, &$result_array, int $rownumber = 0): int|false {} +function odbc_fetch_into($stmt, &$row, int $row_number = 0): int|false {} -/** @param resource $result_id */ -function odbc_fetch_row($result_id, ?int $row_number = null): bool {} +/** @param resource $stmt */ +function odbc_fetch_row($stmt, ?int $row_number = null): bool {} -/** @param resource $result_id */ -function odbc_result($result_id, string|int $field): string|bool|null {} +/** @param resource $stmt */ +function odbc_result($stmt, string|int $column): string|bool|null {} -/** @param resource $result_id */ -function odbc_result_all($result_id, string $format = ""): int|false {} +/** @param resource $stmt */ +function odbc_result_all($stmt, string $format = ""): int|false {} -/** @param resource $result_id */ -function odbc_free_result($result_id): bool {} +/** @param resource $stmt */ +function odbc_free_result($stmt): bool {} /** @return resource|false */ function odbc_connect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER) {} @@ -72,125 +72,125 @@ function odbc_connect(string $dsn, string $user, string $password, int $cursor_o /** @return resource|false */ function odbc_pconnect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER) {} -/** @param resource $connection_id */ -function odbc_close($connection_id): void {} +/** @param resource $odbc */ +function odbc_close($odbc): void {} -/** @param resource $result_id */ -function odbc_num_rows($result_id): int {} +/** @param resource $stmt */ +function odbc_num_rows($stmt): int {} #if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) -/** @param resource $result_id */ -function odbc_next_result($result_id): bool {} +/** @param resource $stmt */ +function odbc_next_result($stmt): bool {} #endif -/** @param resource $result_id */ -function odbc_num_fields($result_id): int {} +/** @param resource $stmt */ +function odbc_num_fields($stmt): int {} -/** @param resource $result_id */ -function odbc_field_name($result_id, int $field_number): string|false {} +/** @param resource $stmt */ +function odbc_field_name($stmt, int $field_number): string|false {} -/** @param resource $result_id */ -function odbc_field_type($result_id, int $field_number): string|false {} +/** @param resource $stmt */ +function odbc_field_type($stmt, int $field_number): string|false {} -/** @param resource $result_id */ -function odbc_field_len($result_id, int $field_number): int|false {} +/** @param resource $stmt */ +function odbc_field_len($stmt, int $field_number): int|false {} /** - * @param resource $result_id + * @param resource $stmt * @alias odbc_field_len */ -function odbc_field_precision($result_id, int $field_number): int|false {} +function odbc_field_precision($stmt, int $field_number): int|false {} -/** @param resource $result_id */ -function odbc_field_scale($result_id, int $field_number): int|false {} +/** @param resource $stmt */ +function odbc_field_scale($stmt, int $field_number): int|false {} -/** @param resource $result_id */ -function odbc_field_num($result_id, string $field_name): int|false {} +/** @param resource $stmt */ +function odbc_field_num($stmt, string $field_name): int|false {} -/** @param resource $connection_id */ -function odbc_autocommit($connection_id, bool $onoff = false): int|bool {} +/** @param resource $odbc */ +function odbc_autocommit($odbc, bool $enable = false): int|bool {} -/** @param resource $connection_id */ -function odbc_commit($connection_id): bool {} +/** @param resource $odbc */ +function odbc_commit($odbc): bool {} -/** @param resource $connection_id */ -function odbc_rollback($connection_id): bool {} +/** @param resource $odbc */ +function odbc_rollback($odbc): bool {} -/** @param resource|null $connection_id */ -function odbc_error($connection_id = null): string {} +/** @param resource|null $odbc */ +function odbc_error($odbc = null): string {} -/** @param resource|null $connection_id */ -function odbc_errormsg($connection_id = null): string {} +/** @param resource|null $odbc */ +function odbc_errormsg($odbc = null): string {} -/** @param resource $conn_id */ -function odbc_setoption($conn_id, int $which, int $option, int $value): bool {} +/** @param resource $odbc */ +function odbc_setoption($odbc, int $which, int $option, int $value): bool {} /** - * @param resource $connection_id + * @param resource $odbc * @return resource|false */ -function odbc_tables($connection_id, ?string $catalog = null, ?string $schema = null, ?string $name = null, ?string $table_types = null) {} +function odbc_tables($odbc, ?string $catalog = null, ?string $schema = null, ?string $table = null, ?string $types = null) {} /** - * @param resource $connection_id + * @param resource $odbc * @return resource|false */ -function odbc_columns($connection_id, ?string $catalog = null, ?string $schema = null, ?string $table_name = null, ?string $column_name = null) {} +function odbc_columns($odbc, ?string $catalog = null, ?string $schema = null, ?string $table = null, ?string $column = null) {} /** - * @param resource $connection_id + * @param resource $odbc * @return resource|false */ -function odbc_gettypeinfo($connection_id, int $data_type = 0) {} +function odbc_gettypeinfo($odbc, int $data_type = 0) {} /** - * @param resource $connection_id + * @param resource $odbc * @return resource|false */ -function odbc_primarykeys($connection_id, ?string $catalog, string $schema, string $table) {} +function odbc_primarykeys($odbc, ?string $catalog, string $schema, string $table) {} #if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35) /** - * @param resource $connection_id + * @param resource $odbc * @return resource|false */ -function odbc_procedurecolumns($connection_id, ?string $catalog = null, ?string $schema = null, ?string $proc = null, ?string $column = null) {} +function odbc_procedurecolumns($odbc, ?string $catalog = null, ?string $schema = null, ?string $procedure = null, ?string $column = null) {} /** - * @param resource $connection_id + * @param resource $odbc * @return resource|false */ -function odbc_procedures($connection_id, ?string $catalog = null, ?string $schema = null, ?string $name = null) {} +function odbc_procedures($odbc, ?string $catalog = null, ?string $schema = null, ?string $procedure = null) {} /** - * @param resource $connection_id + * @param resource $odbc * @return resource|false */ -function odbc_foreignkeys($connection_id, ?string $pk_catalog, string $pk_schema, string $pk_table, string $fk_catalog, string $fk_schema, string $fk_table) {} +function odbc_foreignkeys($odbc, ?string $pk_catalog, string $pk_schema, string $pk_table, string $fk_catalog, string $fk_schema, string $fk_table) {} #endif /** - * @param resource $connection_id + * @param resource $odbc * @return resource|false */ -function odbc_specialcolumns($connection_id, int $type, ?string $catalog, string $schema, string $table, int $scope, int $nullable) {} +function odbc_specialcolumns($odbc, int $type, ?string $catalog, string $schema, string $table, int $scope, int $nullable) {} /** - * @param resource $connection_id + * @param resource $odbc * @return resource|false */ -function odbc_statistics($connection_id, ?string $catalog, string $schema, string $name, int $unique, int $accuracy) {} +function odbc_statistics($odbc, ?string $catalog, string $schema, string $table, int $unique, int $accuracy) {} #if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35) /** - * @param resource $connection_id + * @param resource $odbc * @return resource|false */ -function odbc_tableprivileges($connection_id, ?string $catalog, string $schema, string $name) {} +function odbc_tableprivileges($odbc, ?string $catalog, string $schema, string $table) {} /** - * @param resource $connection_id + * @param resource $odbc * @return resource|false */ -function odbc_columnprivileges($connection_id, ?string $catalog, string $schema, string $table, string $column) {} +function odbc_columnprivileges($odbc, ?string $catalog, string $schema, string $table, string $column) {} #endif diff --git a/ext/odbc/odbc_arginfo.h b/ext/odbc/odbc_arginfo.h index 361c93c5eb648..a2294eb2c92cd 100644 --- a/ext/odbc/odbc_arginfo.h +++ b/ext/odbc/odbc_arginfo.h @@ -1,36 +1,36 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: bdf94bcc0fd30c5b08aa80ecc6c2ff8ca6de3e62 */ + * Stub hash: 0487390208b5f8fe3c863e6ff888e652a75b118c */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_close_all, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_binmode, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, result_id) + ZEND_ARG_INFO(0, stmt) ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_longreadlen, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, result_id) + ZEND_ARG_INFO(0, stmt) ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_prepare, 0, 0, 2) - ZEND_ARG_INFO(0, connection_id) + ZEND_ARG_INFO(0, odbc) ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_execute, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, result_id) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, parameters_array, IS_ARRAY, 0, "[]") + ZEND_ARG_INFO(0, stmt) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_cursor, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_INFO(0, result_id) + ZEND_ARG_INFO(0, stmt) ZEND_END_ARG_INFO() #if defined(HAVE_SQLDATASOURCES) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_data_source, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_INFO(0, connection_id) + ZEND_ARG_INFO(0, odbc) ZEND_ARG_TYPE_INFO(0, fetch_type, IS_LONG, 0) ZEND_END_ARG_INFO() #endif @@ -41,41 +41,41 @@ ZEND_END_ARG_INFO() #if defined(PHP_ODBC_HAVE_FETCH_HASH) ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_odbc_fetch_object, 0, 1, stdClass, MAY_BE_FALSE) - ZEND_ARG_INFO(0, result) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, rownumber, IS_LONG, 0, "-1") + ZEND_ARG_INFO(0, stmt) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row_number, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() #endif #if defined(PHP_ODBC_HAVE_FETCH_HASH) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_fetch_array, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_INFO(0, result) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, rownumber, IS_LONG, 0, "-1") + ZEND_ARG_INFO(0, stmt) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row_number, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_fetch_into, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_INFO(0, result_id) - ZEND_ARG_INFO(1, result_array) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, rownumber, IS_LONG, 0, "0") + ZEND_ARG_INFO(0, stmt) + ZEND_ARG_INFO(1, row) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row_number, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_fetch_row, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, result_id) + ZEND_ARG_INFO(0, stmt) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row_number, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_result, 0, 2, MAY_BE_STRING|MAY_BE_BOOL|MAY_BE_NULL) - ZEND_ARG_INFO(0, result_id) - ZEND_ARG_TYPE_MASK(0, field, MAY_BE_STRING|MAY_BE_LONG, NULL) + ZEND_ARG_INFO(0, stmt) + ZEND_ARG_TYPE_MASK(0, column, MAY_BE_STRING|MAY_BE_LONG, NULL) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_result_all, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_INFO(0, result_id) + ZEND_ARG_INFO(0, stmt) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, format, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_free_result, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, result_id) + ZEND_ARG_INFO(0, stmt) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_connect, 0, 0, 3) @@ -88,30 +88,30 @@ ZEND_END_ARG_INFO() #define arginfo_odbc_pconnect arginfo_odbc_connect ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_close, 0, 1, IS_VOID, 0) - ZEND_ARG_INFO(0, connection_id) + ZEND_ARG_INFO(0, odbc) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_num_rows, 0, 1, IS_LONG, 0) - ZEND_ARG_INFO(0, result_id) + ZEND_ARG_INFO(0, stmt) ZEND_END_ARG_INFO() #if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_next_result, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, result_id) + ZEND_ARG_INFO(0, stmt) ZEND_END_ARG_INFO() #endif #define arginfo_odbc_num_fields arginfo_odbc_num_rows ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_field_name, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_INFO(0, result_id) + ZEND_ARG_INFO(0, stmt) ZEND_ARG_TYPE_INFO(0, field_number, IS_LONG, 0) ZEND_END_ARG_INFO() #define arginfo_odbc_field_type arginfo_odbc_field_name ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_field_len, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_INFO(0, result_id) + ZEND_ARG_INFO(0, stmt) ZEND_ARG_TYPE_INFO(0, field_number, IS_LONG, 0) ZEND_END_ARG_INFO() @@ -120,57 +120,57 @@ ZEND_END_ARG_INFO() #define arginfo_odbc_field_scale arginfo_odbc_field_len ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_field_num, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_INFO(0, result_id) + ZEND_ARG_INFO(0, stmt) ZEND_ARG_TYPE_INFO(0, field_name, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_autocommit, 0, 1, MAY_BE_LONG|MAY_BE_BOOL) - ZEND_ARG_INFO(0, connection_id) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, onoff, _IS_BOOL, 0, "false") + ZEND_ARG_INFO(0, odbc) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enable, IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_commit, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, connection_id) + ZEND_ARG_INFO(0, odbc) ZEND_END_ARG_INFO() #define arginfo_odbc_rollback arginfo_odbc_commit ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_error, 0, 0, IS_STRING, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, connection_id, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, odbc, "null") ZEND_END_ARG_INFO() #define arginfo_odbc_errormsg arginfo_odbc_error ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_setoption, 0, 4, _IS_BOOL, 0) - ZEND_ARG_INFO(0, conn_id) + ZEND_ARG_INFO(0, odbc) ZEND_ARG_TYPE_INFO(0, which, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, value, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_tables, 0, 0, 1) - ZEND_ARG_INFO(0, connection_id) + ZEND_ARG_INFO(0, odbc) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, catalog, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, schema, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, table_types, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, table, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, types, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_columns, 0, 0, 1) - ZEND_ARG_INFO(0, connection_id) + ZEND_ARG_INFO(0, odbc) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, catalog, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, schema, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, table_name, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, column_name, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, table, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, column, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_gettypeinfo, 0, 0, 1) - ZEND_ARG_INFO(0, connection_id) + ZEND_ARG_INFO(0, odbc) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data_type, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_primarykeys, 0, 0, 4) - ZEND_ARG_INFO(0, connection_id) + ZEND_ARG_INFO(0, odbc) ZEND_ARG_TYPE_INFO(0, catalog, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, schema, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, table, IS_STRING, 0) @@ -178,26 +178,26 @@ ZEND_END_ARG_INFO() #if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35) ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_procedurecolumns, 0, 0, 1) - ZEND_ARG_INFO(0, connection_id) + ZEND_ARG_INFO(0, odbc) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, catalog, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, schema, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, proc, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, procedure, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, column, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #endif #if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35) ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_procedures, 0, 0, 1) - ZEND_ARG_INFO(0, connection_id) + ZEND_ARG_INFO(0, odbc) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, catalog, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, schema, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, procedure, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #endif #if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35) ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_foreignkeys, 0, 0, 7) - ZEND_ARG_INFO(0, connection_id) + ZEND_ARG_INFO(0, odbc) ZEND_ARG_TYPE_INFO(0, pk_catalog, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, pk_schema, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, pk_table, IS_STRING, 0) @@ -208,7 +208,7 @@ ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_specialcolumns, 0, 0, 7) - ZEND_ARG_INFO(0, connection_id) + ZEND_ARG_INFO(0, odbc) ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, catalog, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, schema, IS_STRING, 0) @@ -218,26 +218,26 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_specialcolumns, 0, 0, 7) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_statistics, 0, 0, 6) - ZEND_ARG_INFO(0, connection_id) + ZEND_ARG_INFO(0, odbc) ZEND_ARG_TYPE_INFO(0, catalog, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, schema, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, table, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, unique, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, accuracy, IS_LONG, 0) ZEND_END_ARG_INFO() #if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35) ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_tableprivileges, 0, 0, 4) - ZEND_ARG_INFO(0, connection_id) + ZEND_ARG_INFO(0, odbc) ZEND_ARG_TYPE_INFO(0, catalog, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, schema, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, table, IS_STRING, 0) ZEND_END_ARG_INFO() #endif #if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35) ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_columnprivileges, 0, 0, 5) - ZEND_ARG_INFO(0, connection_id) + ZEND_ARG_INFO(0, odbc) ZEND_ARG_TYPE_INFO(0, catalog, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, schema, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, table, IS_STRING, 0) From eea24ad0dde2b37b498f8170732abbd0e33496a7 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 12 Oct 2020 18:47:35 +0200 Subject: [PATCH 2/5] Change `$column` to `$field` where it's about the actual data --- ext/odbc/odbc.stub.php | 2 +- ext/odbc/odbc_arginfo.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/odbc/odbc.stub.php b/ext/odbc/odbc.stub.php index cabcb0df0b349..1c18b35fb804b 100644 --- a/ext/odbc/odbc.stub.php +++ b/ext/odbc/odbc.stub.php @@ -58,7 +58,7 @@ function odbc_fetch_into($stmt, &$row, int $row_number = 0): int|false {} function odbc_fetch_row($stmt, ?int $row_number = null): bool {} /** @param resource $stmt */ -function odbc_result($stmt, string|int $column): string|bool|null {} +function odbc_result($stmt, string|int $field): string|bool|null {} /** @param resource $stmt */ function odbc_result_all($stmt, string $format = ""): int|false {} diff --git a/ext/odbc/odbc_arginfo.h b/ext/odbc/odbc_arginfo.h index a2294eb2c92cd..ff99c1c6dbcfe 100644 --- a/ext/odbc/odbc_arginfo.h +++ b/ext/odbc/odbc_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 0487390208b5f8fe3c863e6ff888e652a75b118c */ + * Stub hash: 28ca96df8fa1bff9721447b40aef75909a96c291 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_close_all, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() @@ -66,7 +66,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_result, 0, 2, MAY_BE_STRING|MAY_BE_BOOL|MAY_BE_NULL) ZEND_ARG_INFO(0, stmt) - ZEND_ARG_TYPE_MASK(0, column, MAY_BE_STRING|MAY_BE_LONG, NULL) + ZEND_ARG_TYPE_MASK(0, field, MAY_BE_STRING|MAY_BE_LONG, NULL) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_result_all, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) From ebec18fcd2b789c633c28ed0f7ea5a77e954f277 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 13 Oct 2020 12:07:24 +0200 Subject: [PATCH 3/5] Rename $row to $array and $row_number to $row --- ext/odbc/odbc.stub.php | 10 +++++----- ext/odbc/odbc_arginfo.h | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ext/odbc/odbc.stub.php b/ext/odbc/odbc.stub.php index 1c18b35fb804b..8099bac3f5d25 100644 --- a/ext/odbc/odbc.stub.php +++ b/ext/odbc/odbc.stub.php @@ -42,20 +42,20 @@ function odbc_do($odbc, string $query) {} #ifdef PHP_ODBC_HAVE_FETCH_HASH /** @param resource $stmt */ -function odbc_fetch_object($stmt, int $row_number = -1): stdClass|false {} +function odbc_fetch_object($stmt, int $row = -1): stdClass|false {} /** @param resource $stmt */ -function odbc_fetch_array($stmt, int $row_number = -1): array|false {} +function odbc_fetch_array($stmt, int $row = -1): array|false {} #endif /** * @param resource $stmt - * @param array $row + * @param array $array */ -function odbc_fetch_into($stmt, &$row, int $row_number = 0): int|false {} +function odbc_fetch_into($stmt, &$array, int $row = 0): int|false {} /** @param resource $stmt */ -function odbc_fetch_row($stmt, ?int $row_number = null): bool {} +function odbc_fetch_row($stmt, ?int $row = null): bool {} /** @param resource $stmt */ function odbc_result($stmt, string|int $field): string|bool|null {} diff --git a/ext/odbc/odbc_arginfo.h b/ext/odbc/odbc_arginfo.h index ff99c1c6dbcfe..b83581f42f836 100644 --- a/ext/odbc/odbc_arginfo.h +++ b/ext/odbc/odbc_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 28ca96df8fa1bff9721447b40aef75909a96c291 */ + * Stub hash: a4331d769d18f3ca6f9d765dc31721f20547d1a3 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_close_all, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() @@ -42,26 +42,26 @@ ZEND_END_ARG_INFO() #if defined(PHP_ODBC_HAVE_FETCH_HASH) ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_odbc_fetch_object, 0, 1, stdClass, MAY_BE_FALSE) ZEND_ARG_INFO(0, stmt) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row_number, IS_LONG, 0, "-1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() #endif #if defined(PHP_ODBC_HAVE_FETCH_HASH) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_fetch_array, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_INFO(0, stmt) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row_number, IS_LONG, 0, "-1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_fetch_into, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_INFO(0, stmt) - ZEND_ARG_INFO(1, row) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row_number, IS_LONG, 0, "0") + ZEND_ARG_INFO(1, array) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_fetch_row, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, stmt) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row_number, IS_LONG, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_result, 0, 2, MAY_BE_STRING|MAY_BE_BOOL|MAY_BE_NULL) @@ -126,7 +126,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_autocommit, 0, 1, MAY_BE_LONG|MAY_BE_BOOL) ZEND_ARG_INFO(0, odbc) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enable, IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enable, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_commit, 0, 1, _IS_BOOL, 0) From 831c8739d54530b0a566c4e3af7b95cbcd8f194a Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 13 Oct 2020 12:55:30 +0200 Subject: [PATCH 4/5] Rename $stmt to $statement --- ext/odbc/odbc.stub.php | 80 ++++++++++++++++++++--------------------- ext/odbc/odbc_arginfo.h | 34 +++++++++--------- 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/ext/odbc/odbc.stub.php b/ext/odbc/odbc.stub.php index 8099bac3f5d25..f9cf73c2258f6 100644 --- a/ext/odbc/odbc.stub.php +++ b/ext/odbc/odbc.stub.php @@ -4,11 +4,11 @@ function odbc_close_all(): void {} -/** @param resource $stmt */ -function odbc_binmode($stmt, int $mode): bool {} +/** @param resource $statement */ +function odbc_binmode($statement, int $mode): bool {} -/** @param resource $stmt */ -function odbc_longreadlen($stmt, int $length): bool {} +/** @param resource $statement */ +function odbc_longreadlen($statement, int $length): bool {} /** * @param resource $odbc @@ -16,11 +16,11 @@ function odbc_longreadlen($stmt, int $length): bool {} */ function odbc_prepare($odbc, string $query) {} -/** @param resource $stmt */ -function odbc_execute($stmt, array $params = []): bool {} +/** @param resource $statement */ +function odbc_execute($statement, array $params = []): bool {} -/** @param resource $stmt */ -function odbc_cursor($stmt): string|false {} +/** @param resource $statement */ +function odbc_cursor($statement): string|false {} #ifdef HAVE_SQLDATASOURCES /** @param resource $odbc */ @@ -41,30 +41,30 @@ function odbc_exec($odbc, string $query) {} function odbc_do($odbc, string $query) {} #ifdef PHP_ODBC_HAVE_FETCH_HASH -/** @param resource $stmt */ -function odbc_fetch_object($stmt, int $row = -1): stdClass|false {} +/** @param resource $statement */ +function odbc_fetch_object($statement, int $row = -1): stdClass|false {} -/** @param resource $stmt */ -function odbc_fetch_array($stmt, int $row = -1): array|false {} +/** @param resource $statement */ +function odbc_fetch_array($statement, int $row = -1): array|false {} #endif /** - * @param resource $stmt + * @param resource $statement * @param array $array */ -function odbc_fetch_into($stmt, &$array, int $row = 0): int|false {} +function odbc_fetch_into($statement, &$array, int $row = 0): int|false {} -/** @param resource $stmt */ -function odbc_fetch_row($stmt, ?int $row = null): bool {} +/** @param resource $statement */ +function odbc_fetch_row($statement, ?int $row = null): bool {} -/** @param resource $stmt */ -function odbc_result($stmt, string|int $field): string|bool|null {} +/** @param resource $statement */ +function odbc_result($statement, string|int $field): string|bool|null {} -/** @param resource $stmt */ -function odbc_result_all($stmt, string $format = ""): int|false {} +/** @param resource $statement */ +function odbc_result_all($statement, string $format = ""): int|false {} -/** @param resource $stmt */ -function odbc_free_result($stmt): bool {} +/** @param resource $statement */ +function odbc_free_result($statement): bool {} /** @return resource|false */ function odbc_connect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER) {} @@ -75,37 +75,37 @@ function odbc_pconnect(string $dsn, string $user, string $password, int $cursor_ /** @param resource $odbc */ function odbc_close($odbc): void {} -/** @param resource $stmt */ -function odbc_num_rows($stmt): int {} +/** @param resource $statement */ +function odbc_num_rows($statement): int {} #if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) -/** @param resource $stmt */ -function odbc_next_result($stmt): bool {} +/** @param resource $statement */ +function odbc_next_result($statement): bool {} #endif -/** @param resource $stmt */ -function odbc_num_fields($stmt): int {} +/** @param resource $statement */ +function odbc_num_fields($statement): int {} -/** @param resource $stmt */ -function odbc_field_name($stmt, int $field_number): string|false {} +/** @param resource $statement */ +function odbc_field_name($statement, int $field_number): string|false {} -/** @param resource $stmt */ -function odbc_field_type($stmt, int $field_number): string|false {} +/** @param resource $statement */ +function odbc_field_type($statement, int $field_number): string|false {} -/** @param resource $stmt */ -function odbc_field_len($stmt, int $field_number): int|false {} +/** @param resource $statement */ +function odbc_field_len($statement, int $field_number): int|false {} /** - * @param resource $stmt + * @param resource $statement * @alias odbc_field_len */ -function odbc_field_precision($stmt, int $field_number): int|false {} +function odbc_field_precision($statement, int $field_number): int|false {} -/** @param resource $stmt */ -function odbc_field_scale($stmt, int $field_number): int|false {} +/** @param resource $statement */ +function odbc_field_scale($statement, int $field_number): int|false {} -/** @param resource $stmt */ -function odbc_field_num($stmt, string $field_name): int|false {} +/** @param resource $statement */ +function odbc_field_num($statement, string $field_name): int|false {} /** @param resource $odbc */ function odbc_autocommit($odbc, bool $enable = false): int|bool {} diff --git a/ext/odbc/odbc_arginfo.h b/ext/odbc/odbc_arginfo.h index b83581f42f836..e224c205ec3c4 100644 --- a/ext/odbc/odbc_arginfo.h +++ b/ext/odbc/odbc_arginfo.h @@ -1,16 +1,16 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: a4331d769d18f3ca6f9d765dc31721f20547d1a3 */ + * Stub hash: 3a018b3bacc1e8dc26c37bae50e299f3dd1bb162 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_close_all, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_binmode, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, stmt) + ZEND_ARG_INFO(0, statement) ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_longreadlen, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, stmt) + ZEND_ARG_INFO(0, statement) ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) ZEND_END_ARG_INFO() @@ -20,12 +20,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_prepare, 0, 0, 2) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_execute, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, stmt) + ZEND_ARG_INFO(0, statement) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_cursor, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_INFO(0, stmt) + ZEND_ARG_INFO(0, statement) ZEND_END_ARG_INFO() #if defined(HAVE_SQLDATASOURCES) @@ -41,41 +41,41 @@ ZEND_END_ARG_INFO() #if defined(PHP_ODBC_HAVE_FETCH_HASH) ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_odbc_fetch_object, 0, 1, stdClass, MAY_BE_FALSE) - ZEND_ARG_INFO(0, stmt) + ZEND_ARG_INFO(0, statement) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() #endif #if defined(PHP_ODBC_HAVE_FETCH_HASH) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_fetch_array, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_INFO(0, stmt) + ZEND_ARG_INFO(0, statement) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_fetch_into, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_INFO(0, stmt) + ZEND_ARG_INFO(0, statement) ZEND_ARG_INFO(1, array) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_fetch_row, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, stmt) + ZEND_ARG_INFO(0, statement) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_result, 0, 2, MAY_BE_STRING|MAY_BE_BOOL|MAY_BE_NULL) - ZEND_ARG_INFO(0, stmt) + ZEND_ARG_INFO(0, statement) ZEND_ARG_TYPE_MASK(0, field, MAY_BE_STRING|MAY_BE_LONG, NULL) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_result_all, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_INFO(0, stmt) + ZEND_ARG_INFO(0, statement) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, format, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_free_result, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, stmt) + ZEND_ARG_INFO(0, statement) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_connect, 0, 0, 3) @@ -92,26 +92,26 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_close, 0, 1, IS_VOID, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_num_rows, 0, 1, IS_LONG, 0) - ZEND_ARG_INFO(0, stmt) + ZEND_ARG_INFO(0, statement) ZEND_END_ARG_INFO() #if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_next_result, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, stmt) + ZEND_ARG_INFO(0, statement) ZEND_END_ARG_INFO() #endif #define arginfo_odbc_num_fields arginfo_odbc_num_rows ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_field_name, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_INFO(0, stmt) + ZEND_ARG_INFO(0, statement) ZEND_ARG_TYPE_INFO(0, field_number, IS_LONG, 0) ZEND_END_ARG_INFO() #define arginfo_odbc_field_type arginfo_odbc_field_name ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_field_len, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_INFO(0, stmt) + ZEND_ARG_INFO(0, statement) ZEND_ARG_TYPE_INFO(0, field_number, IS_LONG, 0) ZEND_END_ARG_INFO() @@ -120,7 +120,7 @@ ZEND_END_ARG_INFO() #define arginfo_odbc_field_scale arginfo_odbc_field_len ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_field_num, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_INFO(0, stmt) + ZEND_ARG_INFO(0, statement) ZEND_ARG_TYPE_INFO(0, field_name, IS_STRING, 0) ZEND_END_ARG_INFO() From 151b34d2bce7de341f162a6df44fabfdb270658b Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 13 Oct 2020 14:57:17 +0200 Subject: [PATCH 5/5] Rename $field_name and $field_number to $field --- ext/odbc/odbc.stub.php | 12 ++++++------ ext/odbc/odbc_arginfo.h | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ext/odbc/odbc.stub.php b/ext/odbc/odbc.stub.php index f9cf73c2258f6..e241022e1049c 100644 --- a/ext/odbc/odbc.stub.php +++ b/ext/odbc/odbc.stub.php @@ -87,25 +87,25 @@ function odbc_next_result($statement): bool {} function odbc_num_fields($statement): int {} /** @param resource $statement */ -function odbc_field_name($statement, int $field_number): string|false {} +function odbc_field_name($statement, int $field): string|false {} /** @param resource $statement */ -function odbc_field_type($statement, int $field_number): string|false {} +function odbc_field_type($statement, int $field): string|false {} /** @param resource $statement */ -function odbc_field_len($statement, int $field_number): int|false {} +function odbc_field_len($statement, int $field): int|false {} /** * @param resource $statement * @alias odbc_field_len */ -function odbc_field_precision($statement, int $field_number): int|false {} +function odbc_field_precision($statement, int $field): int|false {} /** @param resource $statement */ -function odbc_field_scale($statement, int $field_number): int|false {} +function odbc_field_scale($statement, int $field): int|false {} /** @param resource $statement */ -function odbc_field_num($statement, string $field_name): int|false {} +function odbc_field_num($statement, string $field): int|false {} /** @param resource $odbc */ function odbc_autocommit($odbc, bool $enable = false): int|bool {} diff --git a/ext/odbc/odbc_arginfo.h b/ext/odbc/odbc_arginfo.h index e224c205ec3c4..974edf32f0824 100644 --- a/ext/odbc/odbc_arginfo.h +++ b/ext/odbc/odbc_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 3a018b3bacc1e8dc26c37bae50e299f3dd1bb162 */ + * Stub hash: dd2205269dd48e1af19c3980291b21d86fa11a93 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_close_all, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() @@ -105,14 +105,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_field_name, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, statement) - ZEND_ARG_TYPE_INFO(0, field_number, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0) ZEND_END_ARG_INFO() #define arginfo_odbc_field_type arginfo_odbc_field_name ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_field_len, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_INFO(0, statement) - ZEND_ARG_TYPE_INFO(0, field_number, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0) ZEND_END_ARG_INFO() #define arginfo_odbc_field_precision arginfo_odbc_field_len @@ -121,7 +121,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_field_num, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_INFO(0, statement) - ZEND_ARG_TYPE_INFO(0, field_name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, field, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_autocommit, 0, 1, MAY_BE_LONG|MAY_BE_BOOL)