From: Rasmus Lerdorf Date: Sat, 29 Jul 2000 22:32:21 +0000 (+0000) Subject: This url symbol was a bit too generic. Change it to php_url instead. X-Git-Tag: PRE_FILE_COMPILE_API_CHANGE~78 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=677df784c183b4e6aa7c4ae03d88a7ac02efee05;p=php This url symbol was a bit too generic. Change it to php_url instead. It was clashing with a similar typedef in the UdmSearch integration I am working on. --- diff --git a/ext/standard/url.c b/ext/standard/url.c index 9b159d8887..d1d6496565 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -37,7 +37,7 @@ #endif /*_OSD_POSIX*/ -void free_url(url * theurl) +void free_url(php_url * theurl) { if (theurl->scheme) efree(theurl->scheme); @@ -56,7 +56,7 @@ void free_url(url * theurl) efree(theurl); } -url *url_parse(char *str) +php_url *url_parse(char *str) { regex_t re; regmatch_t subs[10]; @@ -64,12 +64,12 @@ url *url_parse(char *str) int length = strlen(str); char *result; - url *ret = (url *) emalloc(sizeof(url)); + php_url *ret = (php_url *) emalloc(sizeof(php_url)); if (!ret) { /*php_error(E_WARNING,"Unable to allocate memory\n");*/ return NULL; } - memset(ret, 0, sizeof(url)); + memset(ret, 0, sizeof(php_url)); /* from Appendix B of draft-fielding-url-syntax-09, http://www.ics.uci.edu/~fielding/url/url.txt */ @@ -161,7 +161,7 @@ url *url_parse(char *str) PHP_FUNCTION(parse_url) { pval **str; - url *resource; + php_url *resource; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) { WRONG_PARAM_COUNT; diff --git a/ext/standard/url.h b/ext/standard/url.h index 33c8754c8b..d07936ea95 100644 --- a/ext/standard/url.h +++ b/ext/standard/url.h @@ -20,7 +20,7 @@ #ifndef URL_H #define URL_H -typedef struct url { +typedef struct php_url { char *scheme; char *user; char *pass; @@ -29,10 +29,10 @@ typedef struct url { char *path; char *query; char *fragment; -} url; +} php_url; -void free_url(url *); -extern url *url_parse(char *); +void free_url(php_url *); +extern php_url *url_parse(char *); extern int php_url_decode(char *, int); /* return value: length of decoded string */ extern char *php_url_encode(char *, int); extern int php_raw_url_decode(char *, int); /* return value: length of decoded string */ diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 2064675418..581281978e 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -512,7 +512,7 @@ PHPAPI FILE *php_fopen_with_path(char *filename, char *mode, char *path, char ** static FILE *php_fopen_url_wrap_http(const char *path, char *mode, int options, int *issock, int *socketd, char **opened_path) { FILE *fp=NULL; - url *resource=NULL; + php_url *resource=NULL; struct sockaddr_in server; char tmp_line[512]; char location[512]; @@ -679,7 +679,7 @@ static FILE *php_fopen_url_wrap_http(const char *path, char *mode, int options, static FILE *php_fopen_url_wrap_ftp(const char *path, char *mode, int options, int *issock, int *socketd, char **opened_path) { FILE *fp=NULL; - url *resource=NULL; + php_url *resource=NULL; struct sockaddr_in server; char tmp_line[512]; unsigned short portno;