com php-src: Merge branch 'PHP-5.6': ext/soap/soap.c
| From: | Xinchen Hui | Date: | Tue, 11 Nov 2014 08:31:32 +0000 |
| Subject: | com php-src: Merge branch 'PHP-5.6': ext/soap/soap.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-83014@lists.php.net to get a copy of this message | ||
Commit: 75b6f9733416d393fd6f4a21cb1610731c04f3aa
Author: Xinchen Hui <laruence@php.net> Tue, 11 Nov 2014 16:31:32 +0800
Parents: 6d215f8ceed95c5404dbdeb71b82f84cc83f33d3 399ec40a7613ef4092668c211d04e1d59c167a14
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=75b6f9733416d393fd6f4a21cb1610731c04f3aa
Log:
Merge branch 'PHP-5.6'
Conflicts:
ext/soap/soap.c
Changed paths:
MM ext/soap/soap.c
Diff:
diff --cc ext/soap/soap.c
index 2b37622,31ea775..94b5cf2
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@@ -4705,19 -4738,21 +4705,20 @@@ static void type_to_string(sdlTypePtr t
if (type->encode &&
(type->encode->details.type == IS_ARRAY ||
type->encode->details.type == SOAP_ENC_ARRAY)) {
- sdlAttributePtr *attr;
- sdlExtraAttributePtr *ext;
+ sdlAttributePtr attr;
+ sdlExtraAttributePtr ext;
if (type->attributes &&
- zend_hash_find(type->attributes, SOAP_1_1_ENC_NAMESPACE":arrayType",
- sizeof(SOAP_1_1_ENC_NAMESPACE":arrayType"),
- (void **)&attr) == SUCCESS &&
- (*attr)->extraAttributes &&
- zend_hash_find((*attr)->extraAttributes, WSDL_NAMESPACE":arrayType",
sizeof(WSDL_NAMESPACE":arrayType"), (void **)&ext) == SUCCESS) {
- char *end = strchr((*ext)->val, '[');
+ (attr = zend_hash_str_find_ptr(type->attributes,
SOAP_1_1_ENC_NAMESPACE":arrayType",
+ sizeof(SOAP_1_1_ENC_NAMESPACE":arrayType")-1)) != NULL &&
++ attr->extraAttributes &&
+ (ext = zend_hash_str_find_ptr(attr->extraAttributes,
WSDL_NAMESPACE":arrayType", sizeof(WSDL_NAMESPACE":arrayType")-1)) != NULL) {
+ char *end = strchr(ext->val, '[');
int len;
if (end == NULL) {
- len = strlen((*ext)->val);
+ len = strlen(ext->val);
} else {
- len = end-(*ext)->val;
+ len = end-ext->val;
}
if (len == 0) {
smart_str_appendl(buf, "anyType", sizeof("anyType")-1);
@@@ -4732,10 -4767,12 +4733,11 @@@
} else {
sdlTypePtr elementType;
if (type->attributes &&
- zend_hash_find(type->attributes, SOAP_1_2_ENC_NAMESPACE":itemType",
- sizeof(SOAP_1_2_ENC_NAMESPACE":itemType"),
- (void **)&attr) == SUCCESS &&
- (*attr)->extraAttributes &&
- zend_hash_find((*attr)->extraAttributes, WSDL_NAMESPACE":itemType",
sizeof(WSDL_NAMESPACE":arrayType"), (void **)&ext) == SUCCESS) {
- smart_str_appends(buf, (*ext)->val);
+ (attr = zend_hash_str_find_ptr(type->attributes,
SOAP_1_2_ENC_NAMESPACE":itemType",
+ sizeof(SOAP_1_2_ENC_NAMESPACE":itemType")-1)) != NULL &&
++ attr->extraAttributes &&
+ (ext = zend_hash_str_find_ptr(attr->extraAttributes,
WSDL_NAMESPACE":itemType", sizeof(WSDL_NAMESPACE":arrayType")-1)) != NULL) {
+ smart_str_appends(buf, ext->val);
smart_str_appendc(buf, ' ');
} else if (type->elements &&
zend_hash_num_elements(type->elements) == 1 &&
@@@ -4749,11 -4787,13 +4751,12 @@@
}
smart_str_appendl(buf, type->name, strlen(type->name));
if (type->attributes &&
- zend_hash_find(type->attributes, SOAP_1_2_ENC_NAMESPACE":arraySize",
- sizeof(SOAP_1_2_ENC_NAMESPACE":arraySize"),
- (void **)&attr) == SUCCESS &&
- (*attr)->extraAttributes &&
- zend_hash_find((*attr)->extraAttributes, WSDL_NAMESPACE":itemType",
sizeof(WSDL_NAMESPACE":arraySize"), (void **)&ext) == SUCCESS) {
+ (attr = zend_hash_str_find_ptr(type->attributes,
SOAP_1_2_ENC_NAMESPACE":arraySize",
+ sizeof(SOAP_1_2_ENC_NAMESPACE":arraySize")-1)) != NULL &&
++ attr->extraAttributes &&
+ (ext = zend_hash_str_find_ptr(attr->extraAttributes,
WSDL_NAMESPACE":itemType", sizeof(WSDL_NAMESPACE":arraySize")-1)) != NULL) {
smart_str_appendc(buf, '[');
- smart_str_appends(buf, (*ext)->val);
+ smart_str_appends(buf, ext->val);
smart_str_appendc(buf, ']');
} else {
smart_str_appendl(buf, "[]", 2);