]> granicus.if.org Git - php/commitdiff
This url symbol was a bit too generic. Change it to php_url instead.
authorRasmus Lerdorf <rasmus@php.net>
Sat, 29 Jul 2000 22:32:21 +0000 (22:32 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Sat, 29 Jul 2000 22:32:21 +0000 (22:32 +0000)
It was clashing with a similar typedef in the UdmSearch integration I am
working on.

ext/standard/url.c
ext/standard/url.h
main/fopen_wrappers.c

index 9b159d8887c61c772adbb29fb806c75108a94462..d1d6496565bc19eb420b37d995ba358bca321301 100644 (file)
@@ -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;
index 33c8754c8bed91a3f4e5e39bdf44ffc6b8bfbe44..d07936ea95e3cd559a2d19279db0e28592c972df 100644 (file)
@@ -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 */
index 2064675418efe6d9cd2df3f4921f98bc326535e3..581281978eac2ebc4b94d97e7be92fb0c8414f68 100644 (file)
@@ -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;