]> granicus.if.org Git - php/commitdiff
Rename smart_str_append to smart_str_append_smart_str
authorNikita Popov <nikic@php.net>
Sun, 21 Sep 2014 18:28:44 +0000 (20:28 +0200)
committerNikita Popov <nikic@php.net>
Sun, 21 Sep 2014 18:49:39 +0000 (20:49 +0200)
It's used only rarely and I'm running out of append names...

Zend/zend_smart_str.h
ext/libxml/php_libxml.h
ext/soap/php_encoding.c
ext/soap/php_http.c
ext/standard/url_scanner_ex.c
ext/standard/url_scanner_ex.re

index 0aff840b3d12efec9f64ec8713c6ca3d4bfcc3c3..501283df31684c5c37d42cb664c8f9627bf5c0a5 100644 (file)
@@ -38,8 +38,8 @@
        smart_str_appendc_ex((dest), (c), 0)
 #define smart_str_appendl(dest, src, len) \
        smart_str_appendl_ex((dest), (src), (len), 0)
-#define smart_str_append(dest, src) \
-       smart_str_append_ex((dest), (src), 0)
+#define smart_str_append_smart_str(dest, src) \
+       smart_str_append_smart_str_ex((dest), (src), 0)
 #define smart_str_sets(dest, src) \
        smart_str_setl((dest), (src), strlen(src));
 #define smart_str_append_long(dest, val) \
@@ -92,7 +92,7 @@ static zend_always_inline void smart_str_appendl_ex(smart_str *dest, const char
        dest->s->len = new_len;
 }
 
-static zend_always_inline void smart_str_append_ex(smart_str *dest, const smart_str *src, zend_bool persistent) {
+static zend_always_inline void smart_str_append_smart_str_ex(smart_str *dest, const smart_str *src, zend_bool persistent) {
        if (src->s && src->s->len) {
                smart_str_appendl_ex(dest, src->s->val, src->s->len, persistent);
        }
index 9518654b5bd3d1e3d8c733f994578a51cb303341..cccc83f8db1fc10f9f58fb81d1f1c258ba9299db 100644 (file)
@@ -34,7 +34,7 @@ extern zend_module_entry libxml_module_entry;
 #      define PHP_LIBXML_API
 #endif
 
-#include "zend_smart_str_public.h"
+#include "zend_smart_str.h"
 #include <libxml/tree.h>
 
 #define LIBXML_SAVE_NOEMPTYTAG 1<<2
index 99375be0502d1c04c1d272ed48e2c23850dcc7f1..d34587b85ecf26e6c962a664d133d886e942177b 100644 (file)
@@ -2441,7 +2441,7 @@ iterator_done:
                                        smart_str_appendl(&array_type,"xsd:ur-type",sizeof("xsd:ur-type")-1);
                                }
                                smart_str_appendc(&array_type, '[');
-                               smart_str_append(&array_type, &array_size);
+                               smart_str_append_smart_str(&array_type, &array_size);
                                smart_str_appendc(&array_type, ']');
                                smart_str_0(&array_type);
                                set_ns_prop(xmlParam, SOAP_1_1_ENC_NAMESPACE, "arrayType", array_type.s->val);
index ebadf6debb85f17a32db5f0dcb3cca9e68fb8be8..a1cee555a8136a1aff7cc3cc4e72dabb234e643b 100644 (file)
@@ -595,7 +595,7 @@ try_again:
                        smart_str_append_const(&soap_headers, "User-Agent: PHP-SOAP/"PHP_VERSION"\r\n");
                }
 
-               smart_str_append(&soap_headers, &soap_headers_z);
+               smart_str_append_smart_str(&soap_headers, &soap_headers_z);
 
                if (soap_version == SOAP_1_2) {
                        smart_str_append_const(&soap_headers,"Content-Type: application/soap+xml; charset=utf-8");
index 71658ec2712c7363f70c8b09657bfb5d977e6e7c..b42b212ac69d7e4bd6c90b3d120fccfb90107a64 100644 (file)
@@ -166,7 +166,7 @@ scan:
        if (yych >= ';') goto yy4;
        ++YYCURSOR;
 #line 125 "ext/standard/url_scanner_ex.re"
-       { smart_str_append(dest, url); return; }
+       { smart_str_append_smart_str(dest, url); return; }
 #line 171 "ext/standard/url_scanner_ex.c"
 yy4:
        ++YYCURSOR;
@@ -195,17 +195,17 @@ done:
        
        /* Don't modify URLs of the format "#mark" */
        if (bash && bash - url->s->val == 0) {
-               smart_str_append(dest, url);
+               smart_str_append_smart_str(dest, url);
                return;
        }
 
        if (bash)
                smart_str_appendl(dest, url->s->val, bash - url->s->val);
        else
-               smart_str_append(dest, url);
+               smart_str_append_smart_str(dest, url);
 
        smart_str_appends(dest, sep);
-       smart_str_append(dest, url_app);
+       smart_str_append_smart_str(dest, url_app);
 
        if (bash)
                smart_str_appendl(dest, bash, q - bash);
@@ -230,7 +230,7 @@ static inline void tag_arg(url_adapt_state_ex_t *ctx, char quotes, char type TSR
        if (f) {
                append_modified_url(&ctx->val, &ctx->result, &ctx->url_app, PG(arg_separator).output);
        } else {
-               smart_str_append(&ctx->result, &ctx->val);
+               smart_str_append_smart_str(&ctx->result, &ctx->val);
        }
        if (quotes)
                smart_str_appendc(&ctx->result, type);
@@ -304,7 +304,7 @@ static void handle_form(STD_PARA)
                }
 
                if (doit)
-                       smart_str_append(&ctx->result, &ctx->form_app);
+                       smart_str_append_smart_str(&ctx->result, &ctx->form_app);
        }
 }
 
@@ -1048,12 +1048,12 @@ PHPAPI int php_url_scanner_add_var(char *name, int name_len, char *value, int va
        
        smart_str_appendl(&BG(url_adapt_state_ex).url_app, name, name_len);
        smart_str_appendc(&BG(url_adapt_state_ex).url_app, '=');
-       smart_str_append(&BG(url_adapt_state_ex).url_app, &val);
+       smart_str_append_smart_str(&BG(url_adapt_state_ex).url_app, &val);
 
        smart_str_appends(&BG(url_adapt_state_ex).form_app, "<input type=\"hidden\" name=\""); 
        smart_str_appendl(&BG(url_adapt_state_ex).form_app, name, name_len);
        smart_str_appends(&BG(url_adapt_state_ex).form_app, "\" value=\"");
-       smart_str_append(&BG(url_adapt_state_ex).form_app, &val);
+       smart_str_append_smart_str(&BG(url_adapt_state_ex).form_app, &val);
        smart_str_appends(&BG(url_adapt_state_ex).form_app, "\" />");
 
        if (urlencode) {
index ce7acfad6b8441b34f63d35f7c6cce79a8cb8ccf..ce49b2ede9c78a1144a38d627b2fdf870f735961 100644 (file)
@@ -122,7 +122,7 @@ static inline void append_modified_url(smart_str *url, smart_str *dest, smart_st
 
 scan:
 /*!re2c
-  ":"          { smart_str_append(dest, url); return; }
+  ":"          { smart_str_append_smart_str(dest, url); return; }
   "?"          { sep = separator; goto scan; }
   "#"          { bash = p - 1; goto done; }
   (any\[:?#])+         { goto scan; }
@@ -131,17 +131,17 @@ done:
        
        /* Don't modify URLs of the format "#mark" */
        if (bash && bash - url->s->val == 0) {
-               smart_str_append(dest, url);
+               smart_str_append_smart_str(dest, url);
                return;
        }
 
        if (bash)
                smart_str_appendl(dest, url->s->val, bash - url->s->val);
        else
-               smart_str_append(dest, url);
+               smart_str_append_smart_str(dest, url);
 
        smart_str_appends(dest, sep);
-       smart_str_append(dest, url_app);
+       smart_str_append_smart_str(dest, url_app);
 
        if (bash)
                smart_str_appendl(dest, bash, q - bash);
@@ -166,7 +166,7 @@ static inline void tag_arg(url_adapt_state_ex_t *ctx, char quotes, char type TSR
        if (f) {
                append_modified_url(&ctx->val, &ctx->result, &ctx->url_app, PG(arg_separator).output);
        } else {
-               smart_str_append(&ctx->result, &ctx->val);
+               smart_str_append_smart_str(&ctx->result, &ctx->val);
        }
        if (quotes)
                smart_str_appendc(&ctx->result, type);
@@ -240,7 +240,7 @@ static void handle_form(STD_PARA)
                }
 
                if (doit)
-                       smart_str_append(&ctx->result, &ctx->form_app);
+                       smart_str_append_smart_str(&ctx->result, &ctx->form_app);
        }
 }
 
@@ -500,12 +500,12 @@ PHPAPI int php_url_scanner_add_var(char *name, int name_len, char *value, int va
        
        smart_str_appendl(&BG(url_adapt_state_ex).url_app, name, name_len);
        smart_str_appendc(&BG(url_adapt_state_ex).url_app, '=');
-       smart_str_append(&BG(url_adapt_state_ex).url_app, &val);
+       smart_str_append_smart_str(&BG(url_adapt_state_ex).url_app, &val);
 
        smart_str_appends(&BG(url_adapt_state_ex).form_app, "<input type=\"hidden\" name=\""); 
        smart_str_appendl(&BG(url_adapt_state_ex).form_app, name, name_len);
        smart_str_appends(&BG(url_adapt_state_ex).form_app, "\" value=\"");
-       smart_str_append(&BG(url_adapt_state_ex).form_app, &val);
+       smart_str_append_smart_str(&BG(url_adapt_state_ex).form_app, &val);
        smart_str_appends(&BG(url_adapt_state_ex).form_app, "\" />");
 
        if (urlencode) {