mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Turn "pdo_stmt_methods" into constants.
This commit is contained in:
parent
0f06df310c
commit
0d484172fe
15 changed files with 15 additions and 15 deletions
|
@ -563,7 +563,7 @@ struct pdo_bound_param_data {
|
|||
/* represents a prepared statement */
|
||||
struct _pdo_stmt_t {
|
||||
/* driver specifics */
|
||||
struct pdo_stmt_methods *methods;
|
||||
const struct pdo_stmt_methods *methods;
|
||||
void *driver_data;
|
||||
|
||||
/* if true, we've already successfully executed this statement at least
|
||||
|
|
|
@ -554,7 +554,7 @@ static int pdo_dblib_stmt_get_column_meta(pdo_stmt_t *stmt, zend_long colno, zva
|
|||
}
|
||||
|
||||
|
||||
struct pdo_stmt_methods dblib_stmt_methods = {
|
||||
const struct pdo_stmt_methods dblib_stmt_methods = {
|
||||
pdo_dblib_stmt_dtor,
|
||||
pdo_dblib_stmt_execute,
|
||||
pdo_dblib_stmt_fetch,
|
||||
|
|
|
@ -105,7 +105,7 @@ int pdo_dblib_msg_handler(DBPROCESS *dbproc, DBINT msgno, int msgstate,
|
|||
int severity, char *msgtext, char *srvname, char *procname, DBUSMALLINT line);
|
||||
|
||||
extern const pdo_driver_t pdo_dblib_driver;
|
||||
extern struct pdo_stmt_methods dblib_stmt_methods;
|
||||
extern const struct pdo_stmt_methods dblib_stmt_methods;
|
||||
|
||||
typedef struct {
|
||||
int severity;
|
||||
|
|
|
@ -761,7 +761,7 @@ static int firebird_stmt_cursor_closer(pdo_stmt_t *stmt) /* {{{ */
|
|||
/* }}} */
|
||||
|
||||
|
||||
struct pdo_stmt_methods firebird_stmt_methods = { /* {{{ */
|
||||
const struct pdo_stmt_methods firebird_stmt_methods = { /* {{{ */
|
||||
firebird_stmt_dtor,
|
||||
firebird_stmt_execute,
|
||||
firebird_stmt_fetch,
|
||||
|
|
|
@ -132,7 +132,7 @@ typedef struct {
|
|||
|
||||
extern const pdo_driver_t pdo_firebird_driver;
|
||||
|
||||
extern struct pdo_stmt_methods firebird_stmt_methods;
|
||||
extern const struct pdo_stmt_methods firebird_stmt_methods;
|
||||
|
||||
void _firebird_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, char const *file, zend_long line);
|
||||
|
||||
|
|
|
@ -923,7 +923,7 @@ static int pdo_mysql_stmt_cursor_closer(pdo_stmt_t *stmt) /* {{{ */
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
struct pdo_stmt_methods mysql_stmt_methods = {
|
||||
const struct pdo_stmt_methods mysql_stmt_methods = {
|
||||
pdo_mysql_stmt_dtor,
|
||||
pdo_mysql_stmt_execute,
|
||||
pdo_mysql_stmt_fetch,
|
||||
|
|
|
@ -155,7 +155,7 @@ extern int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file,
|
|||
#define pdo_mysql_error(s) _pdo_mysql_error(s, NULL, __FILE__, __LINE__)
|
||||
#define pdo_mysql_error_stmt(s) _pdo_mysql_error(stmt->dbh, stmt, __FILE__, __LINE__)
|
||||
|
||||
extern struct pdo_stmt_methods mysql_stmt_methods;
|
||||
extern const struct pdo_stmt_methods mysql_stmt_methods;
|
||||
|
||||
enum {
|
||||
PDO_MYSQL_ATTR_USE_BUFFERED_QUERY = PDO_ATTR_DRIVER_SPECIFIC,
|
||||
|
|
|
@ -795,7 +795,7 @@ static int oci_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, size_t *len
|
|||
}
|
||||
} /* }}} */
|
||||
|
||||
struct pdo_stmt_methods oci_stmt_methods = {
|
||||
const struct pdo_stmt_methods oci_stmt_methods = {
|
||||
oci_stmt_dtor,
|
||||
oci_stmt_execute,
|
||||
oci_stmt_fetch,
|
||||
|
|
|
@ -93,7 +93,7 @@ ub4 _oci_error(OCIError *err, pdo_dbh_t *dbh, pdo_stmt_t *stmt, char *what, swor
|
|||
#define oci_drv_error(w) _oci_error(H->err, dbh, NULL, w, H->last_err, FALSE, __FILE__, __LINE__)
|
||||
#define oci_stmt_error(w) _oci_error(S->err, stmt->dbh, stmt, w, S->last_err, FALSE, __FILE__, __LINE__)
|
||||
|
||||
extern struct pdo_stmt_methods oci_stmt_methods;
|
||||
extern const struct pdo_stmt_methods oci_stmt_methods;
|
||||
|
||||
/* Default prefetch size in number of rows */
|
||||
#define PDO_OCI_PREFETCH_DEFAULT 100
|
||||
|
|
|
@ -856,7 +856,7 @@ static int odbc_stmt_next_rowset(pdo_stmt_t *stmt)
|
|||
return 1;
|
||||
}
|
||||
|
||||
struct pdo_stmt_methods odbc_stmt_methods = {
|
||||
const struct pdo_stmt_methods odbc_stmt_methods = {
|
||||
odbc_stmt_dtor,
|
||||
odbc_stmt_execute,
|
||||
odbc_stmt_fetch,
|
||||
|
|
|
@ -165,7 +165,7 @@ typedef struct {
|
|||
} pdo_odbc_param;
|
||||
|
||||
extern const pdo_driver_t pdo_odbc_driver;
|
||||
extern struct pdo_stmt_methods odbc_stmt_methods;
|
||||
extern const struct pdo_stmt_methods odbc_stmt_methods;
|
||||
|
||||
void pdo_odbc_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, PDO_ODBC_HSTMT statement, char *what, const char *file, int line);
|
||||
#define pdo_odbc_drv_error(what) pdo_odbc_error(dbh, NULL, SQL_NULL_HSTMT, what, __FILE__, __LINE__)
|
||||
|
|
|
@ -707,7 +707,7 @@ static int pdo_pgsql_stmt_cursor_closer(pdo_stmt_t *stmt)
|
|||
return 1;
|
||||
}
|
||||
|
||||
struct pdo_stmt_methods pgsql_stmt_methods = {
|
||||
const struct pdo_stmt_methods pgsql_stmt_methods = {
|
||||
pgsql_stmt_dtor,
|
||||
pgsql_stmt_execute,
|
||||
pgsql_stmt_fetch,
|
||||
|
|
|
@ -85,7 +85,7 @@ extern int _pdo_pgsql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, int errcode, const
|
|||
#define pdo_pgsql_error_stmt(s,e,z) _pdo_pgsql_error(s->dbh, s, e, z, NULL, __FILE__, __LINE__)
|
||||
#define pdo_pgsql_error_stmt_msg(s,e,m) _pdo_pgsql_error(s->dbh, s, e, NULL, m, __FILE__, __LINE__)
|
||||
|
||||
extern struct pdo_stmt_methods pgsql_stmt_methods;
|
||||
extern const struct pdo_stmt_methods pgsql_stmt_methods;
|
||||
|
||||
#define pdo_pgsql_sqlstate(r) PQresultErrorField(r, PG_DIAG_SQLSTATE)
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ extern int _pdo_sqlite_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file,
|
|||
#define pdo_sqlite_error(s) _pdo_sqlite_error(s, NULL, __FILE__, __LINE__)
|
||||
#define pdo_sqlite_error_stmt(s) _pdo_sqlite_error(stmt->dbh, stmt, __FILE__, __LINE__)
|
||||
|
||||
extern struct pdo_stmt_methods sqlite_stmt_methods;
|
||||
extern const struct pdo_stmt_methods sqlite_stmt_methods;
|
||||
|
||||
enum {
|
||||
PDO_SQLITE_ATTR_OPEN_FLAGS = PDO_ATTR_DRIVER_SPECIFIC,
|
||||
|
|
|
@ -352,7 +352,7 @@ static int pdo_sqlite_stmt_cursor_closer(pdo_stmt_t *stmt)
|
|||
return 1;
|
||||
}
|
||||
|
||||
struct pdo_stmt_methods sqlite_stmt_methods = {
|
||||
const struct pdo_stmt_methods sqlite_stmt_methods = {
|
||||
pdo_sqlite_stmt_dtor,
|
||||
pdo_sqlite_stmt_execute,
|
||||
pdo_sqlite_stmt_fetch,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue