1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00

Get rid of reserved name usage

This commit is contained in:
Niels Dossche
2024-05-12 22:26:35 +02:00
parent 7e2831f074
commit e7af2bfd5b
4 changed files with 13 additions and 14 deletions

View File

@@ -24,12 +24,11 @@
#include "php_dom.h"
#include "dom_ce.h"
typedef struct _nodeIterator nodeIterator;
struct _nodeIterator {
typedef struct nodeIterator {
int cur;
int index;
xmlNode *node;
};
} nodeIterator;
/* Function pointer typedef changed in 2.9.8, see https://github.com/GNOME/libxml2/commit/e03f0a199a67017b2f8052354cf732b2b4cae787 */
#if LIBXML_VERSION >= 20908

View File

@@ -33,13 +33,13 @@
#define DOM_FALLBACK_ENCODING_NAME "UTF-8"
#define DOM_FALLBACK_ENCODING_ID LXB_ENCODING_UTF_8
typedef struct _dom_line_column_cache {
typedef struct dom_line_column_cache {
size_t last_line;
size_t last_column;
size_t last_offset;
} dom_line_column_cache;
typedef struct _dom_lexbor_libxml2_bridge_application_data {
typedef struct dom_lexbor_libxml2_bridge_application_data {
const char *input_name;
const lxb_codepoint_t *current_input_codepoints;
const char *current_input_characters;
@@ -49,14 +49,14 @@ typedef struct _dom_lexbor_libxml2_bridge_application_data {
bool html_no_implied;
} dom_lexbor_libxml2_bridge_application_data;
typedef struct _dom_character_encoding_data {
typedef struct dom_character_encoding_data {
const lxb_encoding_data_t *encoding_data;
size_t bom_shift;
} dom_character_encoding_data;
typedef zend_result (*dom_write_output)(void*, const char *, size_t);
typedef struct _dom_output_ctx {
typedef struct dom_output_ctx {
const lxb_encoding_data_t *encoding_data;
const lxb_encoding_data_t *decoding_data;
lxb_encoding_encode_t *encode;
@@ -67,7 +67,7 @@ typedef struct _dom_output_ctx {
dom_write_output write_output;
} dom_output_ctx;
typedef struct _dom_decoding_encoding_ctx {
typedef struct dom_decoding_encoding_ctx {
/* We can skip some conversion if the input and output encoding are both UTF-8,
* we only have to validate and substitute replacement characters */
bool fast_path; /* Put first, near the encode & decode structures, for cache locality */

View File

@@ -768,7 +768,7 @@ zend_result dom_node_text_content_write(dom_object *obj, zval *newval)
/* }}} */
static xmlNodePtr _php_dom_insert_fragment(xmlNodePtr nodep, xmlNodePtr prevsib, xmlNodePtr nextsib, xmlNodePtr fragment, dom_object *intern) /* {{{ */
static xmlNodePtr dom_insert_fragment(xmlNodePtr nodep, xmlNodePtr prevsib, xmlNodePtr nextsib, xmlNodePtr fragment, dom_object *intern) /* {{{ */
{
xmlNodePtr newchild, node;
@@ -908,7 +908,7 @@ static void dom_node_insert_before_legacy(zval *return_value, zval *ref, dom_obj
}
} else if (child->type == XML_DOCUMENT_FRAG_NODE) {
xmlNodePtr last = child->last;
new_child = _php_dom_insert_fragment(parentp, refp->prev, refp, child, intern);
new_child = dom_insert_fragment(parentp, refp->prev, refp, child, intern);
dom_reconcile_ns_list(parentp->doc, new_child, last);
} else {
new_child = xmlAddPrevSibling(refp, child);
@@ -958,7 +958,7 @@ static void dom_node_insert_before_legacy(zval *return_value, zval *ref, dom_obj
}
} else if (child->type == XML_DOCUMENT_FRAG_NODE) {
xmlNodePtr last = child->last;
new_child = _php_dom_insert_fragment(parentp, parentp->last, NULL, child, intern);
new_child = dom_insert_fragment(parentp, parentp->last, NULL, child, intern);
dom_reconcile_ns_list(parentp->doc, new_child, last);
} else {
new_child = xmlAddChild(parentp, child);
@@ -1176,7 +1176,7 @@ static void dom_node_replace_child(INTERNAL_FUNCTION_PARAMETERS, bool modern)
xmlUnlinkNode(oldchild);
xmlNodePtr last = newchild->last;
newchild = _php_dom_insert_fragment(nodep, prevsib, nextsib, newchild, intern);
newchild = dom_insert_fragment(nodep, prevsib, nextsib, newchild, intern);
if (newchild && !modern) {
dom_reconcile_ns_list(nodep->doc, newchild, last);
}
@@ -1343,7 +1343,7 @@ static void dom_node_append_child_legacy(zval *return_value, dom_object *intern,
php_dom_reconcile_attribute_namespace_after_insertion((xmlAttrPtr) new_child);
} else if (child->type == XML_DOCUMENT_FRAG_NODE) {
xmlNodePtr last = child->last;
new_child = _php_dom_insert_fragment(nodep, nodep->last, NULL, child, intern);
new_child = dom_insert_fragment(nodep, nodep->last, NULL, child, intern);
dom_reconcile_ns_list(nodep->doc, new_child, last);
} else if (child->type == XML_DTD_NODE) {
if (nodep->doc->intSubset != NULL) {

View File

@@ -23,7 +23,7 @@ enum dom_nodelist_dimension_index_type {
DOM_NODELIST_DIM_LONG,
};
typedef struct _dom_nodelist_dimension_index {
typedef struct dom_nodelist_dimension_index {
union {
zend_long lval;
zend_string *str;