summaryrefslogtreecommitdiff
path: root/ext/soap
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-09-19 17:32:50 +0400
committerDmitry Stogov <dmitry@zend.com>2014-09-19 17:32:50 +0400
commitbccc653185d2fe8aa6ff83cf84db56a396c6bc05 (patch)
tree5288aafc3ed4e0542e0cb0a2d90b5bf59df60b1c /ext/soap
parent35f84676877564f3d4ead8f48bc98f72b7b20ff7 (diff)
downloadphp-git-bccc653185d2fe8aa6ff83cf84db56a396c6bc05.tar.gz
Avoid double IS_INTERNED() check
Diffstat (limited to 'ext/soap')
-rw-r--r--ext/soap/php_sdl.c3
-rw-r--r--ext/soap/soap.c6
2 files changed, 4 insertions, 5 deletions
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c
index c7e52dfb8c..d67bea1ab7 100644
--- a/ext/soap/php_sdl.c
+++ b/ext/soap/php_sdl.c
@@ -3288,9 +3288,8 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, zend_long cache_wsdl TSRMLS_DC)
}
smart_str_0(&headers);
- ZVAL_STR(&str_headers, zend_string_copy(headers.s));
+ ZVAL_NEW_STR(&str_headers, headers.s);
php_stream_context_set_option(context, "http", "header", &str_headers);
- smart_str_free(&headers);
zval_ptr_dtor(&str_headers);
}
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 554957d512..97a569de30 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -1429,7 +1429,7 @@ PHP_METHOD(SoapServer, addFunction)
return;
}
- ZVAL_STR(&function_copy, zend_string_copy(f->common.function_name));
+ ZVAL_STR_COPY(&function_copy, f->common.function_name);
zend_hash_update(service->soap_functions.ft, key, &function_copy);
zend_string_release(key);
@@ -1452,7 +1452,7 @@ PHP_METHOD(SoapServer, addFunction)
zend_hash_init(service->soap_functions.ft, 0, NULL, ZVAL_PTR_DTOR, 0);
}
- ZVAL_STR(&function_copy, zend_string_copy(f->common.function_name));
+ ZVAL_STR_COPY(&function_copy, f->common.function_name);
zend_hash_update(service->soap_functions.ft, key, &function_copy);
zend_string_release(key);
} else if (Z_TYPE_P(function_name) == IS_LONG) {
@@ -1713,7 +1713,7 @@ PHP_METHOD(SoapServer, handle)
if (zend_hash_str_exists(&Z_OBJCE(tmp_soap)->function_table, php_strtolower(class_name, class_name_len), class_name_len)) {
zval c_ret, constructor;
- ZVAL_STR(&constructor, zend_string_copy(service->soap_class.ce->name));
+ ZVAL_STR_COPY(&constructor, service->soap_class.ce->name);
if (call_user_function(NULL, &tmp_soap, &constructor, &c_ret, service->soap_class.argc, service->soap_class.argv TSRMLS_CC) == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Error calling constructor");
}