summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2002-05-04 18:33:13 +0000
committerSascha Schumann <sas@php.net>2002-05-04 18:33:13 +0000
commit9743860d35c17da9b36c104c16cb06122d6cf6f6 (patch)
tree06d63c81ef2ada41067498b05d5174de4d21d9eb /main
parentebfff2df7e350557c72424311e94ca1984184a40 (diff)
downloadphp-git-9743860d35c17da9b36c104c16cb06122d6cf6f6.tar.gz
simplify handling of variables by maintaining two strings which
are simply appended instead of traversing the hash table on each URL/form. also fix an unconditional segfault in rshutdown due to efree'ing a static char *. remove remove_var, add reset_vars. move the function declarations into the right header file.
Diffstat (limited to 'main')
-rw-r--r--main/output.c11
-rw-r--r--main/php_output.h3
2 files changed, 5 insertions, 9 deletions
diff --git a/main/output.c b/main/output.c
index 2999227a1d..c8d414910a 100644
--- a/main/output.c
+++ b/main/output.c
@@ -795,16 +795,9 @@ PHPAPI int php_get_output_start_lineno(TSRMLS_D)
return OG(output_start_lineno);
}
-PHP_FUNCTION(output_remove_rewrite_var)
+PHP_FUNCTION(output_reset_rewrite_vars)
{
- char *name;
- int name_len;
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) {
- RETURN_FALSE;
- }
-
- if (php_url_scanner_remove_var(name, name_len TSRMLS_CC) == SUCCESS) {
+ if (php_url_scanner_reset_vars(TSRMLS_C) == SUCCESS) {
RETURN_TRUE;
} else {
RETURN_FALSE;
diff --git a/main/php_output.h b/main/php_output.h
index f1a8069ce1..48f9bde31d 100644
--- a/main/php_output.h
+++ b/main/php_output.h
@@ -94,5 +94,8 @@ ZEND_API extern php_output_globals output_globals;
#define PHP_OUTPUT_HANDLER_INTERNAL 0
#define PHP_OUTPUT_HANDLER_USER 1
+PHP_FUNCTION(output_add_rewrite_var);
+PHP_FUNCTION(output_reset_rewrite_vars);
+
#endif /* PHP_OUTPUT_H */