From: Michael Wallner Date: Tue, 17 Feb 2015 19:36:38 +0000 (+0100) Subject: remove dead code X-Git-Tag: RELEASE_2_3_0_RC1~4 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=3d2d2a1c7727f26905863e6ac72e1e021fea133f;p=m6w6%2Fext-http remove dead code --- diff --git a/php_http_url.c b/php_http_url.c index 5316265..6bfca24 100644 --- a/php_http_url.c +++ b/php_http_url.c @@ -123,20 +123,6 @@ static php_http_url_t *php_http_url_from_env(TSRMLS_D) return url(buf); } -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_url_t *url = php_http_url_mod((const php_http_url_t *) old_url, (const php_http_url_t *) new_url, flags TSRMLS_CC); - - if (url_ptr) { - *url_ptr = php_http_url_to_php_url(url); - } - if (url_str) { - php_http_url_to_string(url, url_str, url_len, 0); - } - - php_http_url_free(&url); -} - #define url_isset(u,n) \ ((u)&&(u)->n) #define url_append(buf, append) do { \ diff --git a/php_http_url.h b/php_http_url.h index 9268048..303b936 100644 --- a/php_http_url.h +++ b/php_http_url.h @@ -59,9 +59,6 @@ typedef struct php_http_url { PHP_HTTP_API php_http_url_t *php_http_url_parse(const char *str, size_t len, unsigned flags TSRMLS_DC); PHP_HTTP_API php_http_url_t *php_http_url_parse_authority(const char *str, size_t len, unsigned flags TSRMLS_DC); -/* deprecated */ -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); -/* use this instead */ PHP_HTTP_API php_http_url_t *php_http_url_mod(const php_http_url_t *old_url, const php_http_url_t *new_url, unsigned flags TSRMLS_DC); PHP_HTTP_API php_http_url_t *php_http_url_copy(const php_http_url_t *url, zend_bool persistent); PHP_HTTP_API php_http_url_t *php_http_url_from_struct(HashTable *ht); @@ -76,25 +73,7 @@ PHP_HTTP_API STATUS php_http_url_encode_hash_ex(HashTable *hash, php_http_buffer static inline void php_http_url_argsep(const char **str, size_t *len TSRMLS_DC) { - if (SUCCESS != php_http_ini_entry(ZEND_STRL("arg_separator.output"), str, len, 0 TSRMLS_CC) || !*len) { - *str = PHP_HTTP_URL_ARGSEP; - *len = lenof(PHP_HTTP_URL_ARGSEP); - } -} - -static inline php_url *php_http_url_to_php_url(php_http_url_t *url) -{ - php_url *purl = ecalloc(1, sizeof(*purl)); - - if (url->scheme) purl->scheme = estrdup(url->scheme); - if (url->pass) purl->pass = estrdup(url->pass); - if (url->user) purl->user = estrdup(url->user); - if (url->host) purl->host = estrdup(url->host); - if (url->path) purl->path = estrdup(url->path); - if (url->query) purl->query = estrdup(url->query); - if (url->fragment) purl->fragment = estrdup(url->fragment); - - return purl; + php_http_ini_entry(ZEND_STRL("arg_separator.output"), str, len, 0 TSRMLS_CC); } static inline zend_bool php_http_url_is_empty(const php_http_url_t *url) {