X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_params.c;h=54ef493d0ab2c1d0fc0fe92d1b5d3668a1b9b38f;hp=f7c7b7bb09966895f54bda98e87faa05ced60095;hb=4407379af8d886b627c88572e9da69c38cdbda58;hpb=3ac7f0d524ed57a3dcfbac16a8f998718c6a28dc diff --git a/php_http_params.c b/php_http_params.c index f7c7b7b..54ef493 100644 --- a/php_http_params.c +++ b/php_http_params.c @@ -10,10 +10,7 @@ +--------------------------------------------------------------------+ */ -#include "php_http.h" - -#include -#include +#include "php_http_api.h" static php_http_params_token_t def_param_sep = {",", 1}, *def_param_sep_ptr[] = {&def_param_sep, NULL}; static php_http_params_token_t def_arg_sep = {";", 1}, *def_arg_sep_ptr[] = {&def_arg_sep, NULL}; @@ -179,7 +176,9 @@ PHP_HTTP_API HashTable *php_http_params_parse(HashTable *params, const php_http_ PHP_HTTP_BEGIN_ARGS(__construct, 0) PHP_HTTP_ARG_VAL(params, 0) - PHP_HTTP_ARG_VAL(flags, 0) + PHP_HTTP_ARG_VAL(param_sep, 0) + PHP_HTTP_ARG_VAL(arg_sep, 0) + PHP_HTTP_ARG_VAL(val_sep, 0) PHP_HTTP_END_ARGS; PHP_HTTP_EMPTY_ARGS(toArray); @@ -288,10 +287,13 @@ PHP_METHOD(HttpParams, __construct) switch (ZEND_NUM_ARGS()) { case 4: zend_update_property(php_http_params_class_entry, getThis(), ZEND_STRL("param_sep"), param_sep TSRMLS_CC); + /* no break */ case 3: zend_update_property(php_http_params_class_entry, getThis(), ZEND_STRL("arg_sep"), arg_sep TSRMLS_CC); + /* no break */ case 2: zend_update_property(php_http_params_class_entry, getThis(), ZEND_STRL("val_sep"), val_sep TSRMLS_CC); + /* no break */ } if (zparams) {