summaryrefslogtreecommitdiff
path: root/main/SAPI.h
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2003-02-20 22:21:49 +0000
committerRasmus Lerdorf <rasmus@php.net>2003-02-20 22:21:49 +0000
commitd08a0e99c865509214c9a577babc9499f6d377b3 (patch)
treedf78b262b07c5ec8593ea0747903737aecb5c572 /main/SAPI.h
parent9d89ef32956e1e5593d22232a5a0eaa5015343c1 (diff)
downloadphp-git-d08a0e99c865509214c9a577babc9499f6d377b3.tar.gz
An input filter might not simply strip stuff, it might also turn things
into entities or use some other mechanism which causes the filtered data to be longer than the original data. Ergo, pass in the address of the buffer instead so the filter is free to reallocate it.
Diffstat (limited to 'main/SAPI.h')
-rw-r--r--main/SAPI.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/SAPI.h b/main/SAPI.h
index 1bc31b26cb..88692d255b 100644
--- a/main/SAPI.h
+++ b/main/SAPI.h
@@ -178,7 +178,7 @@ SAPI_API int sapi_register_post_entry(sapi_post_entry *post_entry);
SAPI_API void sapi_unregister_post_entry(sapi_post_entry *post_entry);
SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(TSRMLS_D));
SAPI_API int sapi_register_treat_data(void (*treat_data)(int arg, char *str, zval *destArray TSRMLS_DC));
-SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char *var, char *val, unsigned int val_len TSRMLS_DC));
+SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char *var, char **val, unsigned int val_len TSRMLS_DC));
SAPI_API int sapi_flush(TSRMLS_D);
SAPI_API struct stat *sapi_get_stat(TSRMLS_D);
@@ -240,7 +240,7 @@ struct _sapi_module_struct {
int (*get_target_uid)(uid_t * TSRMLS_DC);
int (*get_target_gid)(gid_t * TSRMLS_DC);
- unsigned int (*input_filter)(int arg, char *var, char *val, unsigned int val_len TSRMLS_DC);
+ unsigned int (*input_filter)(int arg, char *var, char **val, unsigned int val_len TSRMLS_DC);
};
@@ -269,7 +269,7 @@ struct _sapi_post_entry {
#define SAPI_POST_HANDLER_FUNC(post_handler) void post_handler(char *content_type_dup, void *arg TSRMLS_DC)
#define SAPI_TREAT_DATA_FUNC(treat_data) void treat_data(int arg, char *str, zval* destArray TSRMLS_DC)
-#define SAPI_INPUT_FILTER_FUNC(input_filter) unsigned int input_filter(int arg, char *var, char *val, unsigned int val_len TSRMLS_DC)
+#define SAPI_INPUT_FILTER_FUNC(input_filter) unsigned int input_filter(int arg, char *var, char **val, unsigned int val_len TSRMLS_DC)
SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data);
SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader);