Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ext/dom names after policy change #14171

Merged
merged 4 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions ext/dom/characterdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ PHP_METHOD(DOMCharacterData, appendData)
dom_character_data_append_data(INTERNAL_FUNCTION_PARAM_PASSTHRU, true);
}

PHP_METHOD(DOM_CharacterData, appendData)
PHP_METHOD(Dom_CharacterData, appendData)
{
dom_character_data_append_data(INTERNAL_FUNCTION_PARAM_PASSTHRU, false);
}
Expand Down Expand Up @@ -255,7 +255,7 @@ PHP_METHOD(DOMCharacterData, insertData)
dom_character_data_insert_data(INTERNAL_FUNCTION_PARAM_PASSTHRU, true);
}

PHP_METHOD(DOM_CharacterData, insertData)
PHP_METHOD(Dom_CharacterData, insertData)
{
dom_character_data_insert_data(INTERNAL_FUNCTION_PARAM_PASSTHRU, false);
}
Expand Down Expand Up @@ -327,7 +327,7 @@ PHP_METHOD(DOMCharacterData, deleteData)
dom_character_data_delete_data(INTERNAL_FUNCTION_PARAM_PASSTHRU, true);
}

PHP_METHOD(DOM_CharacterData, deleteData)
PHP_METHOD(Dom_CharacterData, deleteData)
{
dom_character_data_delete_data(INTERNAL_FUNCTION_PARAM_PASSTHRU, false);
}
Expand Down Expand Up @@ -407,7 +407,7 @@ PHP_METHOD(DOMCharacterData, replaceData)
dom_character_data_replace_data(INTERNAL_FUNCTION_PARAM_PASSTHRU, true);
}

PHP_METHOD(DOM_CharacterData, replaceData)
PHP_METHOD(Dom_CharacterData, replaceData)
{
dom_character_data_replace_data(INTERNAL_FUNCTION_PARAM_PASSTHRU, false);
}
Expand Down
16 changes: 8 additions & 8 deletions ext/dom/document.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ PHP_METHOD(DOMDocument, createElement)
DOM_RET_OBJ(node, intern);
}

PHP_METHOD(DOM_Document, createElement)
PHP_METHOD(Dom_Document, createElement)
{
xmlNode *node;
xmlDocPtr docp;
Expand Down Expand Up @@ -662,7 +662,7 @@ PHP_METHOD(DOMDocument, createProcessingInstruction)
dom_document_create_processing_instruction(INTERNAL_FUNCTION_PARAM_PASSTHRU, false);
}

PHP_METHOD(DOM_Document, createProcessingInstruction)
PHP_METHOD(Dom_Document, createProcessingInstruction)
{
dom_document_create_processing_instruction(INTERNAL_FUNCTION_PARAM_PASSTHRU, true);
}
Expand Down Expand Up @@ -827,13 +827,13 @@ static void dom_modern_document_import_node(INTERNAL_FUNCTION_PARAMETERS, zend_c
DOM_RET_OBJ(retnodep, intern);
}

PHP_METHOD(DOM_Document, importNode)
PHP_METHOD(Dom_Document, importNode)
{
dom_modern_document_import_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, dom_modern_node_class_entry);
}
/* }}} end dom_document_import_node */

PHP_METHOD(DOM_Document, importLegacyNode)
PHP_METHOD(Dom_Document, importLegacyNode)
{
dom_modern_document_import_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, dom_node_class_entry);
}
Expand Down Expand Up @@ -893,7 +893,7 @@ PHP_METHOD(DOMDocument, createElementNS)
DOM_RET_OBJ(nodep, intern);
}

PHP_METHOD(DOM_Document, createElementNS)
PHP_METHOD(Dom_Document, createElementNS)
{
xmlDocPtr docp;
dom_object *intern;
Expand Down Expand Up @@ -1199,7 +1199,7 @@ PHP_METHOD(DOMDocument, adoptNode)
dom_document_adopt_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, false);
}

PHP_METHOD(DOM_Document, adoptNode)
PHP_METHOD(Dom_Document, adoptNode)
{
dom_document_adopt_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, true);
}
Expand Down Expand Up @@ -1693,7 +1693,7 @@ PHP_METHOD(DOMDocument, saveXML)
dom_document_save_xml(INTERNAL_FUNCTION_PARAM_PASSTHRU, dom_node_class_entry);
}

PHP_METHOD(DOM_XMLDocument, saveXML)
PHP_METHOD(Dom_XMLDocument, saveXml)
{
dom_document_save_xml(INTERNAL_FUNCTION_PARAM_PASSTHRU, dom_modern_node_class_entry);
}
Expand Down Expand Up @@ -2266,7 +2266,7 @@ PHP_METHOD(DOMDocument, registerNodeClass)
dom_document_register_node_class(INTERNAL_FUNCTION_PARAM_PASSTHRU, false);
}

PHP_METHOD(DOM_Document, registerNodeClass)
PHP_METHOD(Dom_Document, registerNodeClass)
{
dom_document_register_node_class(INTERNAL_FUNCTION_PARAM_PASSTHRU, true);
}
Expand Down
6 changes: 3 additions & 3 deletions ext/dom/domimplementation.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ PHP_METHOD(DOMImplementation, createDocumentType)
DOM_RET_OBJ((xmlNodePtr) doctype, NULL);
}

PHP_METHOD(DOM_Implementation, createDocumentType)
PHP_METHOD(Dom_Implementation, createDocumentType)
{
size_t name_len, publicid_len = 0, systemid_len = 0;
const char *name, *publicid = NULL, *systemid = NULL;
Expand Down Expand Up @@ -249,7 +249,7 @@ PHP_METHOD(DOMImplementation, createDocument)
}
}

PHP_METHOD(DOM_Implementation, createDocument)
PHP_METHOD(Dom_Implementation, createDocument)
{
zval *dtd = NULL;
xmlDtdPtr doctype = NULL;
Expand Down Expand Up @@ -343,7 +343,7 @@ PHP_METHOD(DOM_Implementation, createDocument)
/* }}} end dom_domimplementation_create_document */

/* {{{ URL: https://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument */
PHP_METHOD(DOM_Implementation, createHTMLDocument)
PHP_METHOD(Dom_Implementation, createHTMLDocument)
{
const char *title = NULL;
size_t title_len = 0;
Expand Down
14 changes: 7 additions & 7 deletions ext/dom/element.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ PHP_METHOD(DOMElement, removeAttribute)
RETURN_BOOL(dom_remove_attribute(nodep, attrp));
}

PHP_METHOD(DOM_Element, removeAttribute)
PHP_METHOD(Dom_Element, removeAttribute)
{
xmlNodePtr nodep, attrp;
dom_object *intern;
Expand Down Expand Up @@ -749,7 +749,7 @@ PHP_METHOD(DOMElement, removeAttributeNode)
dom_element_remove_attribute_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, dom_node_class_entry);
}

PHP_METHOD(DOM_Element, removeAttributeNode)
PHP_METHOD(Dom_Element, removeAttributeNode)
{
dom_element_remove_attribute_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, dom_modern_node_class_entry);
}
Expand Down Expand Up @@ -785,7 +785,7 @@ PHP_METHOD(DOMElement, getElementsByTagName)
dom_element_get_elements_by_tag_name(INTERNAL_FUNCTION_PARAM_PASSTHRU, false);
}

PHP_METHOD(DOM_Element, getElementsByTagName)
PHP_METHOD(Dom_Element, getElementsByTagName)
{
dom_element_get_elements_by_tag_name(INTERNAL_FUNCTION_PARAM_PASSTHRU, true);
}
Expand Down Expand Up @@ -1172,7 +1172,7 @@ PHP_METHOD(DOMElement, setAttributeNodeNS)
dom_element_set_attribute_node_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, /* use_ns */ true, /* modern */ false);
}

PHP_METHOD(DOM_Element, setAttributeNodeNS)
PHP_METHOD(Dom_Element, setAttributeNodeNS)
{
dom_element_set_attribute_node_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, /* use_ns */ true, /* modern */ true);
}
Expand Down Expand Up @@ -1208,7 +1208,7 @@ PHP_METHOD(DOMElement, getElementsByTagNameNS)
dom_element_get_elements_by_tag_name_ns(INTERNAL_FUNCTION_PARAM_PASSTHRU, false);
}

PHP_METHOD(DOM_Element, getElementsByTagNameNS)
PHP_METHOD(Dom_Element, getElementsByTagNameNS)
{
dom_element_get_elements_by_tag_name_ns(INTERNAL_FUNCTION_PARAM_PASSTHRU, true);
}
Expand Down Expand Up @@ -1387,7 +1387,7 @@ PHP_METHOD(DOMElement, setIdAttributeNode)
dom_element_set_id_attribute_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, dom_attr_class_entry);
}

PHP_METHOD(DOM_Element, setIdAttributeNode)
PHP_METHOD(Dom_Element, setIdAttributeNode)
{
dom_element_set_id_attribute_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, dom_modern_attr_class_entry);
}
Expand Down Expand Up @@ -1595,7 +1595,7 @@ PHP_METHOD(DOMElement, insertAdjacentElement)
dom_element_insert_adjacent_element(INTERNAL_FUNCTION_PARAM_PASSTHRU, dom_element_class_entry);
}

PHP_METHOD(DOM_Element, insertAdjacentElement)
PHP_METHOD(Dom_Element, insertAdjacentElement)
{
dom_element_insert_adjacent_element(INTERNAL_FUNCTION_PARAM_PASSTHRU, dom_modern_element_class_entry);
}
Expand Down
2 changes: 1 addition & 1 deletion ext/dom/html_collection.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static void dom_html_collection_named_item_into_zval(zval *return_value, zend_st
}
}

PHP_METHOD(DOM_HTMLCollection, namedItem)
PHP_METHOD(Dom_HTMLCollection, namedItem)
{
zend_string *key;
ZEND_PARSE_PARAMETERS_START(1, 1)
Expand Down
12 changes: 6 additions & 6 deletions ext/dom/html_document.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,13 +722,13 @@ static bool check_options_validity(uint32_t arg_num, zend_long options)
"LIBXML_NOERROR, "
"LIBXML_COMPACT, "
"LIBXML_HTML_NOIMPLIED, "
"DOM\\NO_DEFAULT_NS)");
"Dom\\NO_DEFAULT_NS)");
return false;
}
return true;
}

PHP_METHOD(DOM_HTMLDocument, createEmpty)
PHP_METHOD(Dom_HTMLDocument, createEmpty)
{
const char *encoding = "UTF-8";
size_t encoding_len = strlen("UTF-8");
Expand Down Expand Up @@ -775,7 +775,7 @@ static bool dom_should_register_error_handlers(zend_long options)
return php_libxml_uses_internal_errors() || ((EG(error_reporting) | EG(user_error_handler_error_reporting)) & E_WARNING);
}

PHP_METHOD(DOM_HTMLDocument, createFromString)
PHP_METHOD(Dom_HTMLDocument, createFromString)
{
const char *source, *override_encoding = NULL;
size_t source_len, override_encoding_len;
Expand Down Expand Up @@ -926,7 +926,7 @@ PHP_METHOD(DOM_HTMLDocument, createFromString)
RETURN_THROWS();
}

PHP_METHOD(DOM_HTMLDocument, createFromFile)
PHP_METHOD(Dom_HTMLDocument, createFromFile)
{
const char *filename, *override_encoding = NULL;
php_dom_libxml_ns_mapper *ns_mapper = NULL;
Expand Down Expand Up @@ -1265,7 +1265,7 @@ static zend_result dom_common_save(dom_output_ctx *output_ctx, const xmlDoc *doc
return SUCCESS;
}

PHP_METHOD(DOM_HTMLDocument, saveHTMLFile)
PHP_METHOD(Dom_HTMLDocument, saveHtmlFile)
{
zval *id;
xmlDoc *docp;
Expand Down Expand Up @@ -1304,7 +1304,7 @@ PHP_METHOD(DOM_HTMLDocument, saveHTMLFile)
RETURN_LONG(bytes);
}

PHP_METHOD(DOM_HTMLDocument, saveHTML)
PHP_METHOD(Dom_HTMLDocument, saveHtml)
{
zval *nodep = NULL;
const xmlDoc *docp;
Expand Down
24 changes: 12 additions & 12 deletions ext/dom/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ PHP_METHOD(DOMNode, insertBefore)
dom_node_insert_before(INTERNAL_FUNCTION_PARAM_PASSTHRU, false);
}

PHP_METHOD(DOM_Node, insertBefore)
PHP_METHOD(Dom_Node, insertBefore)
{
dom_node_insert_before(INTERNAL_FUNCTION_PARAM_PASSTHRU, true);
}
Expand Down Expand Up @@ -1207,7 +1207,7 @@ PHP_METHOD(DOMNode, replaceChild)
dom_node_replace_child(INTERNAL_FUNCTION_PARAM_PASSTHRU, false);
}

PHP_METHOD(DOM_Node, replaceChild)
PHP_METHOD(Dom_Node, replaceChild)
{
dom_node_replace_child(INTERNAL_FUNCTION_PARAM_PASSTHRU, true);
}
Expand Down Expand Up @@ -1257,7 +1257,7 @@ PHP_METHOD(DOMNode, removeChild)
dom_node_remove_child(INTERNAL_FUNCTION_PARAM_PASSTHRU, dom_node_class_entry);
}

PHP_METHOD(DOM_Node, removeChild)
PHP_METHOD(Dom_Node, removeChild)
{
dom_node_remove_child(INTERNAL_FUNCTION_PARAM_PASSTHRU, dom_modern_node_class_entry);
}
Expand Down Expand Up @@ -1389,7 +1389,7 @@ PHP_METHOD(DOMNode, appendChild)
dom_node_append_child_legacy(return_value, intern, childobj, nodep, child);
}

PHP_METHOD(DOM_Node, appendChild)
PHP_METHOD(Dom_Node, appendChild)
{
zval *node;
xmlNodePtr nodep, child;
Expand Down Expand Up @@ -1580,7 +1580,7 @@ PHP_METHOD(DOMNode, isSameNode)
dom_node_is_same_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, node);
}

PHP_METHOD(DOM_Node, isSameNode)
PHP_METHOD(Dom_Node, isSameNode)
{
zval *node;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O!", &node, dom_modern_node_class_entry) != SUCCESS) {
Expand Down Expand Up @@ -1780,7 +1780,7 @@ PHP_METHOD(DOMNode, isEqualNode)
dom_node_is_equal_node_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, false);
}

PHP_METHOD(DOM_Node, isEqualNode)
PHP_METHOD(Dom_Node, isEqualNode)
{
dom_node_is_equal_node_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, true);
}
Expand Down Expand Up @@ -1877,7 +1877,7 @@ PHP_METHOD(DOMNode, lookupPrefix)
dom_node_lookup_prefix(INTERNAL_FUNCTION_PARAM_PASSTHRU, false);
}

PHP_METHOD(DOM_Node, lookupPrefix)
PHP_METHOD(Dom_Node, lookupPrefix)
{
dom_node_lookup_prefix(INTERNAL_FUNCTION_PARAM_PASSTHRU, true);
}
Expand Down Expand Up @@ -1989,7 +1989,7 @@ PHP_METHOD(DOMNode, isDefaultNamespace)
RETURN_FALSE;
}

PHP_METHOD(DOM_Node, isDefaultNamespace)
PHP_METHOD(Dom_Node, isDefaultNamespace)
{
zval *id;
xmlNodePtr nodep;
Expand Down Expand Up @@ -2291,7 +2291,7 @@ PHP_METHOD(DOMNode, getNodePath)
dom_node_get_node_path(INTERNAL_FUNCTION_PARAM_PASSTHRU, false);
}

PHP_METHOD(DOM_Node, getNodePath)
PHP_METHOD(Dom_Node, getNodePath)
{
dom_node_get_node_path(INTERNAL_FUNCTION_PARAM_PASSTHRU, true);
}
Expand Down Expand Up @@ -2354,7 +2354,7 @@ PHP_METHOD(DOMNode, contains)
RETURN_BOOL(dom_node_contains(thisp, otherp));
}

PHP_METHOD(DOM_Node, contains)
PHP_METHOD(Dom_Node, contains)
{
zval *other, *id;
xmlNodePtr otherp, thisp;
Expand Down Expand Up @@ -2570,7 +2570,7 @@ PHP_METHOD(DOMNode, compareDocumentPosition)
dom_node_compare_document_position(INTERNAL_FUNCTION_PARAM_PASSTHRU, dom_node_class_entry);
}

PHP_METHOD(DOM_Node, compareDocumentPosition)
PHP_METHOD(Dom_Node, compareDocumentPosition)
{
dom_node_compare_document_position(INTERNAL_FUNCTION_PARAM_PASSTHRU, dom_modern_node_class_entry);
}
Expand All @@ -2585,7 +2585,7 @@ PHP_METHOD(DOM_Node, compareDocumentPosition)
* - If the user implements __sleep / __wakeup, then it's also not a problem because they will not enter the throwing methods.
*/

PHP_METHOD(DOM_Node, __construct)
PHP_METHOD(Dom_Node, __construct)
{
ZEND_UNREACHABLE();
}
Expand Down