summaryrefslogtreecommitdiff
path: root/ext/pdo_pgsql
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2017-12-14 22:59:58 +0300
committerDmitry Stogov <dmitry@zend.com>2017-12-14 22:59:58 +0300
commit0d484172fe7b35beae14ae777c2bda9cf120b55c (patch)
treed638a858f83a371043cbb2d188b70370d9811670 /ext/pdo_pgsql
parent0f06df310c879e3506409277831c4cba7d4d9af7 (diff)
downloadphp-git-0d484172fe7b35beae14ae777c2bda9cf120b55c.tar.gz
Turn "pdo_stmt_methods" into constants.
Diffstat (limited to 'ext/pdo_pgsql')
-rw-r--r--ext/pdo_pgsql/pgsql_statement.c2
-rw-r--r--ext/pdo_pgsql/php_pdo_pgsql_int.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c
index 783dab2244..63d9ee6b73 100644
--- a/ext/pdo_pgsql/pgsql_statement.c
+++ b/ext/pdo_pgsql/pgsql_statement.c
@@ -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,
diff --git a/ext/pdo_pgsql/php_pdo_pgsql_int.h b/ext/pdo_pgsql/php_pdo_pgsql_int.h
index 8a0d96420e..d861be005a 100644
--- a/ext/pdo_pgsql/php_pdo_pgsql_int.h
+++ b/ext/pdo_pgsql/php_pdo_pgsql_int.h
@@ -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)