summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2017-12-14 18:43:44 +0300
committerDmitry Stogov <dmitry@zend.com>2017-12-14 18:43:44 +0300
commit9e709e2fa02b85d0d10c864d6c996e3368e977ce (patch)
tree148bedd2674933ba40e59f15fcfa2981f7aead85 /ext/pdo_sqlite
parent71eaf0d97f173093253163db8c4720bd62387e34 (diff)
downloadphp-git-9e709e2fa02b85d0d10c864d6c996e3368e977ce.tar.gz
Move constants into read-only data segment
Diffstat (limited to 'ext/pdo_sqlite')
-rw-r--r--ext/pdo_sqlite/pdo_sqlite.c2
-rw-r--r--ext/pdo_sqlite/php_pdo_sqlite_int.h2
-rw-r--r--ext/pdo_sqlite/sqlite_driver.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/ext/pdo_sqlite/pdo_sqlite.c b/ext/pdo_sqlite/pdo_sqlite.c
index 60e1a07afb..0730bbaec4 100644
--- a/ext/pdo_sqlite/pdo_sqlite.c
+++ b/ext/pdo_sqlite/pdo_sqlite.c
@@ -32,7 +32,7 @@
#include "zend_exceptions.h"
/* {{{ pdo_sqlite_functions[] */
-const zend_function_entry pdo_sqlite_functions[] = {
+static const zend_function_entry pdo_sqlite_functions[] = {
PHP_FE_END
};
/* }}} */
diff --git a/ext/pdo_sqlite/php_pdo_sqlite_int.h b/ext/pdo_sqlite/php_pdo_sqlite_int.h
index 1c90416b9f..073c868484 100644
--- a/ext/pdo_sqlite/php_pdo_sqlite_int.h
+++ b/ext/pdo_sqlite/php_pdo_sqlite_int.h
@@ -68,7 +68,7 @@ typedef struct {
unsigned done:1;
} pdo_sqlite_stmt;
-extern pdo_driver_t pdo_sqlite_driver;
+extern const pdo_driver_t pdo_sqlite_driver;
extern int _pdo_sqlite_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int line);
#define pdo_sqlite_error(s) _pdo_sqlite_error(s, NULL, __FILE__, __LINE__)
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c
index e0627c1e32..b2790ee57e 100644
--- a/ext/pdo_sqlite/sqlite_driver.c
+++ b/ext/pdo_sqlite/sqlite_driver.c
@@ -722,7 +722,7 @@ static void pdo_sqlite_request_shutdown(pdo_dbh_t *dbh)
}
}
-static struct pdo_dbh_methods sqlite_methods = {
+static const struct pdo_dbh_methods sqlite_methods = {
sqlite_handle_closer,
sqlite_handle_preparer,
sqlite_handle_doer,
@@ -845,7 +845,7 @@ cleanup:
}
/* }}} */
-pdo_driver_t pdo_sqlite_driver = {
+const pdo_driver_t pdo_sqlite_driver = {
PDO_DRIVER_HEADER(sqlite),
pdo_sqlite_handle_factory
};