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);
} 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 &&
}
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);