diff options
author | Dmitry Stogov <dmitry@php.net> | 2007-09-27 18:28:44 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2007-09-27 18:28:44 +0000 |
commit | 8146078f7bbbe4f4799e1a154ea450c90c855728 (patch) | |
tree | 46cb160985407d24ff3a9d485a90e88fee4cdbb6 /ext/pdo/pdo_dbh.c | |
parent | 98a2c03808f73be0c08bfe654b985483ccb8d6bc (diff) | |
download | php-git-8146078f7bbbe4f4799e1a154ea450c90c855728.tar.gz |
Improved memory usage by movig constants to read only memory. (Dmitry, Pierre)
Diffstat (limited to 'ext/pdo/pdo_dbh.c')
-rwxr-xr-x | ext/pdo/pdo_dbh.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index d169a59f8e..42c69606ce 100755 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -1137,7 +1137,7 @@ static PHP_METHOD(PDO, getAvailableDrivers) } /* }}} */ -zend_function_entry pdo_dbh_functions[] = { +const zend_function_entry pdo_dbh_functions[] = { ZEND_MALIAS(PDO, __construct, dbh_constructor, NULL, ZEND_ACC_PUBLIC) PHP_ME(PDO, prepare, NULL, ZEND_ACC_PUBLIC) PHP_ME(PDO, beginTransaction, NULL, ZEND_ACC_PUBLIC) @@ -1160,7 +1160,7 @@ zend_function_entry pdo_dbh_functions[] = { /* {{{ overloaded object handlers for PDO class */ int pdo_hash_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC) { - zend_function_entry *funcs; + const zend_function_entry *funcs; zend_function func; zend_internal_function *ifunc = (zend_internal_function*)&func; int namelen; @@ -1183,11 +1183,11 @@ int pdo_hash_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC) while (funcs->fname) { ifunc->type = ZEND_INTERNAL_FUNCTION; ifunc->handler = funcs->handler; - pdo_zstr_sval(ifunc->function_name) = funcs->fname; + pdo_zstr_sval(ifunc->function_name) = (char*)funcs->fname; ifunc->scope = dbh->ce; ifunc->prototype = NULL; if (funcs->arg_info) { - ifunc->arg_info = funcs->arg_info + 1; + ifunc->arg_info = (zend_arg_info*)funcs->arg_info + 1; ifunc->num_args = funcs->num_args; if (funcs->arg_info[0].required_num_args == -1) { ifunc->required_num_args = funcs->num_args; |