mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
ext/soap: Replace single usage of CHECK_XML_NULL with FIND_XML_NULL (#18698)
This removes the implicit assumption about the variable name of the zval Moreover, nearby the FIND_XML_NULL macro is used anyway.
This commit is contained in:
committed by
GitHub
parent
fdebad0b25
commit
407c9781f9
@@ -112,22 +112,6 @@ static void set_ns_and_type(xmlNodePtr node, encodeTypePtr type);
|
|||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CHECK_XML_NULL(xml) \
|
|
||||||
{ \
|
|
||||||
xmlAttrPtr null; \
|
|
||||||
if (!xml) { \
|
|
||||||
ZVAL_NULL(ret); \
|
|
||||||
return ret; \
|
|
||||||
} \
|
|
||||||
if (xml->properties) { \
|
|
||||||
null = get_attribute(xml->properties, "nil"); \
|
|
||||||
if (null) { \
|
|
||||||
ZVAL_NULL(ret); \
|
|
||||||
return ret; \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define FIND_ZVAL_NULL(zval, xml, style) \
|
#define FIND_ZVAL_NULL(zval, xml, style) \
|
||||||
{ \
|
{ \
|
||||||
if (!zval || Z_TYPE_P(zval) == IS_NULL) { \
|
if (!zval || Z_TYPE_P(zval) == IS_NULL) { \
|
||||||
@@ -1480,7 +1464,7 @@ static zval *to_zval_object_ex(zval *ret, encodeTypePtr type, xmlNodePtr data, z
|
|||||||
sdlType->encode->details.sdl_type->kind != XSD_TYPEKIND_LIST &&
|
sdlType->encode->details.sdl_type->kind != XSD_TYPEKIND_LIST &&
|
||||||
sdlType->encode->details.sdl_type->kind != XSD_TYPEKIND_UNION) {
|
sdlType->encode->details.sdl_type->kind != XSD_TYPEKIND_UNION) {
|
||||||
|
|
||||||
CHECK_XML_NULL(data);
|
FIND_XML_NULL(data, ret);
|
||||||
if (soap_check_xml_ref(ret, data)) {
|
if (soap_check_xml_ref(ret, data)) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user