com php-src: Rename smart_str_append to smart_str_a ppend_smart_str: Zend/zend_smart_str.h ext/libx ml/php_libxml.h ext/soap/php_encoding.c
ext/soap/ph p_http.c ext/standard/url_scanner_ex.c ext/standa rd/url_scanner_ex.re
| From: | Nikita Popov | Date: | Sun, 21 Sep 2014 18:49:39 +0000 |
| Subject: | com php-src: Rename smart_str_append to smart_str_a ppend_smart_str: Zend/zend_smart_str.h ext/libx ml/php_libxml.h ext/soap/php_encoding.c ext/soap/ph p_http.c ext/standard/url_scanner_ex.c ext/standa rd/url_scanner_ex.re |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-81845@lists.php.net to get a copy of this message | ||
Commit: 2a7de9fdbba28152fadcdddc2b731d319405e106
Author: Nikita Popov <nikic@php.net> Sun, 21 Sep 2014 20:28:44 +0200
Parents: e0df8cc8100f31534718e69cc41981e6c7490b20
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2a7de9fdbba28152fadcdddc2b731d319405e106
Log:
Rename smart_str_append to smart_str_append_smart_str
It's used only rarely and I'm running out of append names....
Changed paths:
M Zend/zend_smart_str.h
M ext/libxml/php_libxml.h
M ext/soap/php_encoding.c
M ext/soap/php_http.c
M ext/standard/url_scanner_ex.c
M ext/standard/url_scanner_ex.re
Diff:
diff --git a/Zend/zend_smart_str.h b/Zend/zend_smart_str.h
index 0aff840..501283d 100644
--- a/Zend/zend_smart_str.h
+++ b/Zend/zend_smart_str.h
@@ -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);
}
diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h
index 9518654..cccc83f 100644
--- a/ext/libxml/php_libxml.h
+++ b/ext/libxml/php_libxml.h
@@ -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
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index 99375be..d34587b 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -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);
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index ebadf6d..a1cee55 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -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");
diff --git a/ext/standard/url_scanner_ex.c b/ext/standard/url_scanner_ex.c
index 71658ec..b42b212 100644
--- a/ext/standard/url_scanner_ex.c
+++ b/ext/standard/url_scanner_ex.c
@@ -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) {
diff --git a/ext/standard/url_scanner_ex.re b/ext/standard/url_scanner_ex.re
index ce7acfa...ce49b2e 100644
--- a/ext/standard/url_scanner_ex.re
+++ b/ext/standard/url_scanner_ex.re
@@ -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) {