X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=src%2Fphp_http_url.h;h=eead59a88f82f495793d2566f27353e963afe4b5;hp=6ae0ac38af2b081d9967b1876b544e25fac0146c;hb=8f8c6de6ae23ee114c9fac41d82ae866c1747132;hpb=57e944b102006abfa4005337b0ac5901425f4289 diff --git a/src/php_http_url.h b/src/php_http_url.h index 6ae0ac3..eead59a 100644 --- a/src/php_http_url.h +++ b/src/php_http_url.h @@ -13,7 +13,7 @@ #ifndef PHP_HTTP_URL_H #define PHP_HTTP_URL_H -#include +#include "ext/standard/url.h" /* php_http_url_mod() */ #define PHP_HTTP_URL_REPLACE 0x000 @@ -45,8 +45,23 @@ /* percent encode multibyte sequences in userinfo, path, query and fragment */ #define PHP_HTTP_URL_PARSE_TOPCT 0x200000 +#if PHP_HTTP_HAVE_IDNA2008 +#define PHP_HTTP_URL_PARSE_TOIDN_2008 \ + (PHP_HTTP_URL_PARSE_TOIDN | 0x400000) +#endif +#if PHP_HTTP_HAVE_IDNA2003 +#define PHP_HTTP_URL_PARSE_TOIDN_2003 \ + (PHP_HTTP_URL_PARSE_TOIDN | 0x800000) +#endif + +/* ignore errors */ +#define PHP_HTTP_URL_IGNORE_ERRORS 0x10000000 +/* do not report errors */ +#define PHP_HTTP_URL_SILENT_ERRORS 0x20000000 + +#define PHP_HTTP_URL_STDFLAGS 0x00332003 + typedef struct php_http_url { - /* compatible to php_url, but do not use php_url_free() */ char *scheme; char *user; char *pass; @@ -83,7 +98,8 @@ static inline zend_bool php_http_url_is_empty(const php_http_url_t *url) { return !(url->scheme || url->pass || url->user || url->host || url->port || url->path || url->query || url->fragment); } -PHP_HTTP_API zend_class_entry *php_http_url_class_entry; +PHP_HTTP_API zend_class_entry *php_http_url_get_class_entry(void); +PHP_HTTP_API zend_class_entry *php_http_get_env_url_class_entry(void); PHP_MINIT_FUNCTION(http_url); #define php_http_url_object_new php_http_object_new