summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2007-09-27 18:00:48 +0000
committerDmitry Stogov <dmitry@php.net>2007-09-27 18:00:48 +0000
commit6c810b0d4c1b12c675f69f5cfb32f26b6179d460 (patch)
treee95f336ce39693101bed812985b914c9bd80523e /ext/pdo_sqlite
parentf6d9901873156c560eb6da7dafbefc56c363b2bd (diff)
downloadphp-git-6c810b0d4c1b12c675f69f5cfb32f26b6179d460.tar.gz
Improved memory usage by movig constants to read only memory. (Dmitry, Pierre)
Diffstat (limited to 'ext/pdo_sqlite')
-rw-r--r--ext/pdo_sqlite/pdo_sqlite.c4
-rw-r--r--ext/pdo_sqlite/sqlite_driver.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/pdo_sqlite/pdo_sqlite.c b/ext/pdo_sqlite/pdo_sqlite.c
index fadb2fce86..7f48c4c237 100644
--- a/ext/pdo_sqlite/pdo_sqlite.c
+++ b/ext/pdo_sqlite/pdo_sqlite.c
@@ -34,7 +34,7 @@
#define PHP_PDO_SQLITE_MODULE_VERSION "1.0.1"
/* {{{ pdo_sqlite_functions[] */
-zend_function_entry pdo_sqlite_functions[] = {
+const zend_function_entry pdo_sqlite_functions[] = {
{NULL, NULL, NULL}
};
/* }}} */
@@ -42,7 +42,7 @@ zend_function_entry pdo_sqlite_functions[] = {
/* {{{ pdo_sqlite_deps
*/
#if ZEND_MODULE_API_NO >= 20050922
-static zend_module_dep pdo_sqlite_deps[] = {
+static const zend_module_dep pdo_sqlite_deps[] = {
ZEND_MOD_REQUIRED("pdo")
{NULL, NULL, NULL}
};
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c
index eeb9d1f28e..03fe166650 100644
--- a/ext/pdo_sqlite/sqlite_driver.c
+++ b/ext/pdo_sqlite/sqlite_driver.c
@@ -593,13 +593,13 @@ static PHP_METHOD(SQLite, sqliteCreateAggregate)
RETURN_FALSE;
}
/* }}} */
-static zend_function_entry dbh_methods[] = {
+static const zend_function_entry dbh_methods[] = {
PHP_ME(SQLite, sqliteCreateFunction, NULL, ZEND_ACC_PUBLIC)
PHP_ME(SQLite, sqliteCreateAggregate, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
-static zend_function_entry *get_driver_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC)
+static const zend_function_entry *get_driver_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC)
{
switch (kind) {
case PDO_DBH_DRIVER_METHOD_KIND_DBH: