X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_url.h;h=23f529dfa3ddc91caceb69d52839aee46d49bdfd;hp=7b16c0119f17e723fd5f1cd6087d9fe0ae9e4b52;hb=dedad9f35cbeaee56e7cca145e378cc6548198e3;hpb=d2aca1740aad980f8ec182c2f9ffac20f15a4a54 diff --git a/php_http_url.h b/php_http_url.h index 7b16c01..23f529d 100644 --- a/php_http_url.h +++ b/php_http_url.h @@ -39,8 +39,19 @@ PHP_HTTP_API void php_http_url(int flags, const php_url *old_url, const php_url *new_url, php_url **url_ptr, char **url_str, size_t *url_len TSRMLS_DC); PHP_HTTP_API char *php_http_url_absolute(const char *url, int flags TSRMLS_DC); -PHP_HTTP_API STATUS php_http_url_encode_hash(HashTable *hash, zend_bool override_argsep, char *pre_encoded_data, size_t pre_encoded_len, char **encoded_data, size_t *encoded_len TSRMLS_DC); -PHP_HTTP_API STATUS php_http_url_encode_hash_recursive(HashTable *ht, php_http_buffer_t *str, const char *arg_sep, size_t arg_sep_len, const char *prefix, size_t prefix_len TSRMLS_DC); +PHP_HTTP_API STATUS php_http_url_encode_hash(HashTable *hash, const char *pre_encoded_str, size_t pre_encoded_len, char **encoded_str, size_t *encoded_len TSRMLS_DC); +PHP_HTTP_API STATUS php_http_url_encode_hash_ex(HashTable *ht, php_http_buffer_t *str, const char *arg_sep_str, size_t arg_sep_len, const char *val_sep_str, size_t val_sep_len, const char *prefix_str, size_t prefix_len TSRMLS_DC); + +static inline void php_http_url_argsep(const char **str, size_t *len TSRMLS_DC) +{ + *str = INI_STR("arg_separator.output"); + *len = strlen(*str); + + if (!*len) { + *str = PHP_HTTP_URL_ARGSEP; + *len = lenof(PHP_HTTP_URL_ARGSEP); + } +} static inline php_url *php_http_url_from_struct(php_url *url, HashTable *ht TSRMLS_DC) {