summaryrefslogtreecommitdiff
path: root/ext/sqlite/sqlite.c
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/sqlite/sqlite.c
parentf6d9901873156c560eb6da7dafbefc56c363b2bd (diff)
downloadphp-git-6c810b0d4c1b12c675f69f5cfb32f26b6179d460.tar.gz
Improved memory usage by movig constants to read only memory. (Dmitry, Pierre)
Diffstat (limited to 'ext/sqlite/sqlite.c')
-rw-r--r--ext/sqlite/sqlite.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c
index cbf80a290e..6ead6c0302 100644
--- a/ext/sqlite/sqlite.c
+++ b/ext/sqlite/sqlite.c
@@ -164,7 +164,7 @@ static int php_sqlite_fetch(struct php_sqlite_result *rres TSRMLS_DC);
enum { PHPSQLITE_ASSOC = 1, PHPSQLITE_NUM = 2, PHPSQLITE_BOTH = PHPSQLITE_ASSOC|PHPSQLITE_NUM };
-zend_function_entry sqlite_functions[] = {
+const zend_function_entry sqlite_functions[] = {
PHP_FE(sqlite_open, third_arg_force_ref)
PHP_FE(sqlite_popen, third_arg_force_ref)
PHP_FE(sqlite_close, NULL)
@@ -207,7 +207,7 @@ zend_function_entry sqlite_functions[] = {
{NULL, NULL, NULL}
};
-zend_function_entry sqlite_funcs_db[] = {
+const zend_function_entry sqlite_funcs_db[] = {
PHP_ME_MAPPING(__construct, sqlite_open, third_arg_force_ref, 0)
/* PHP_ME_MAPPING(close, sqlite_close, NULL, 0)*/
PHP_ME_MAPPING(query, sqlite_query, third_arg_force_ref, 0)
@@ -227,7 +227,7 @@ zend_function_entry sqlite_funcs_db[] = {
{NULL, NULL, NULL}
};
-zend_function_entry sqlite_funcs_query[] = {
+const zend_function_entry sqlite_funcs_query[] = {
PHP_ME_MAPPING(fetch, sqlite_fetch_array, NULL, 0)
PHP_ME_MAPPING(fetchObject, sqlite_fetch_object, NULL, 0)
PHP_ME_MAPPING(fetchSingle, sqlite_fetch_single, NULL, 0)
@@ -251,7 +251,7 @@ zend_function_entry sqlite_funcs_query[] = {
{NULL, NULL, NULL}
};
-zend_function_entry sqlite_funcs_ub_query[] = {
+const zend_function_entry sqlite_funcs_ub_query[] = {
PHP_ME_MAPPING(fetch, sqlite_fetch_array, NULL, 0)
PHP_ME_MAPPING(fetchObject, sqlite_fetch_object, NULL, 0)
PHP_ME_MAPPING(fetchSingle, sqlite_fetch_single, NULL, 0)
@@ -266,12 +266,12 @@ zend_function_entry sqlite_funcs_ub_query[] = {
{NULL, NULL, NULL}
};
-zend_function_entry sqlite_funcs_exception[] = {
+const zend_function_entry sqlite_funcs_exception[] = {
{NULL, NULL, NULL}
};
/* Dependancies */
-static zend_module_dep sqlite_deps[] = {
+static const zend_module_dep sqlite_deps[] = {
#if defined(HAVE_SPL) && ((PHP_MAJOR_VERSION > 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1))
ZEND_MOD_REQUIRED("spl")
#endif