Skip to content

Commit e7af2bf

Browse files
committed
Get rid of reserved name usage
1 parent 7e2831f commit e7af2bf

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

ext/dom/dom_iterators.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@
2424
#include "php_dom.h"
2525
#include "dom_ce.h"
2626

27-
typedef struct _nodeIterator nodeIterator;
28-
struct _nodeIterator {
27+
typedef struct nodeIterator {
2928
int cur;
3029
int index;
3130
xmlNode *node;
32-
};
31+
} nodeIterator;
3332

3433
/* Function pointer typedef changed in 2.9.8, see https://github.com/GNOME/libxml2/commit/e03f0a199a67017b2f8052354cf732b2b4cae787 */
3534
#if LIBXML_VERSION >= 20908

ext/dom/html_document.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@
3333
#define DOM_FALLBACK_ENCODING_NAME "UTF-8"
3434
#define DOM_FALLBACK_ENCODING_ID LXB_ENCODING_UTF_8
3535

36-
typedef struct _dom_line_column_cache {
36+
typedef struct dom_line_column_cache {
3737
size_t last_line;
3838
size_t last_column;
3939
size_t last_offset;
4040
} dom_line_column_cache;
4141

42-
typedef struct _dom_lexbor_libxml2_bridge_application_data {
42+
typedef struct dom_lexbor_libxml2_bridge_application_data {
4343
const char *input_name;
4444
const lxb_codepoint_t *current_input_codepoints;
4545
const char *current_input_characters;
@@ -49,14 +49,14 @@ typedef struct _dom_lexbor_libxml2_bridge_application_data {
4949
bool html_no_implied;
5050
} dom_lexbor_libxml2_bridge_application_data;
5151

52-
typedef struct _dom_character_encoding_data {
52+
typedef struct dom_character_encoding_data {
5353
const lxb_encoding_data_t *encoding_data;
5454
size_t bom_shift;
5555
} dom_character_encoding_data;
5656

5757
typedef zend_result (*dom_write_output)(void*, const char *, size_t);
5858

59-
typedef struct _dom_output_ctx {
59+
typedef struct dom_output_ctx {
6060
const lxb_encoding_data_t *encoding_data;
6161
const lxb_encoding_data_t *decoding_data;
6262
lxb_encoding_encode_t *encode;
@@ -67,7 +67,7 @@ typedef struct _dom_output_ctx {
6767
dom_write_output write_output;
6868
} dom_output_ctx;
6969

70-
typedef struct _dom_decoding_encoding_ctx {
70+
typedef struct dom_decoding_encoding_ctx {
7171
/* We can skip some conversion if the input and output encoding are both UTF-8,
7272
* we only have to validate and substitute replacement characters */
7373
bool fast_path; /* Put first, near the encode & decode structures, for cache locality */

ext/dom/node.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ zend_result dom_node_text_content_write(dom_object *obj, zval *newval)
768768

769769
/* }}} */
770770

771-
static xmlNodePtr _php_dom_insert_fragment(xmlNodePtr nodep, xmlNodePtr prevsib, xmlNodePtr nextsib, xmlNodePtr fragment, dom_object *intern) /* {{{ */
771+
static xmlNodePtr dom_insert_fragment(xmlNodePtr nodep, xmlNodePtr prevsib, xmlNodePtr nextsib, xmlNodePtr fragment, dom_object *intern) /* {{{ */
772772
{
773773
xmlNodePtr newchild, node;
774774

@@ -908,7 +908,7 @@ static void dom_node_insert_before_legacy(zval *return_value, zval *ref, dom_obj
908908
}
909909
} else if (child->type == XML_DOCUMENT_FRAG_NODE) {
910910
xmlNodePtr last = child->last;
911-
new_child = _php_dom_insert_fragment(parentp, refp->prev, refp, child, intern);
911+
new_child = dom_insert_fragment(parentp, refp->prev, refp, child, intern);
912912
dom_reconcile_ns_list(parentp->doc, new_child, last);
913913
} else {
914914
new_child = xmlAddPrevSibling(refp, child);
@@ -958,7 +958,7 @@ static void dom_node_insert_before_legacy(zval *return_value, zval *ref, dom_obj
958958
}
959959
} else if (child->type == XML_DOCUMENT_FRAG_NODE) {
960960
xmlNodePtr last = child->last;
961-
new_child = _php_dom_insert_fragment(parentp, parentp->last, NULL, child, intern);
961+
new_child = dom_insert_fragment(parentp, parentp->last, NULL, child, intern);
962962
dom_reconcile_ns_list(parentp->doc, new_child, last);
963963
} else {
964964
new_child = xmlAddChild(parentp, child);
@@ -1176,7 +1176,7 @@ static void dom_node_replace_child(INTERNAL_FUNCTION_PARAMETERS, bool modern)
11761176
xmlUnlinkNode(oldchild);
11771177

11781178
xmlNodePtr last = newchild->last;
1179-
newchild = _php_dom_insert_fragment(nodep, prevsib, nextsib, newchild, intern);
1179+
newchild = dom_insert_fragment(nodep, prevsib, nextsib, newchild, intern);
11801180
if (newchild && !modern) {
11811181
dom_reconcile_ns_list(nodep->doc, newchild, last);
11821182
}
@@ -1343,7 +1343,7 @@ static void dom_node_append_child_legacy(zval *return_value, dom_object *intern,
13431343
php_dom_reconcile_attribute_namespace_after_insertion((xmlAttrPtr) new_child);
13441344
} else if (child->type == XML_DOCUMENT_FRAG_NODE) {
13451345
xmlNodePtr last = child->last;
1346-
new_child = _php_dom_insert_fragment(nodep, nodep->last, NULL, child, intern);
1346+
new_child = dom_insert_fragment(nodep, nodep->last, NULL, child, intern);
13471347
dom_reconcile_ns_list(nodep->doc, new_child, last);
13481348
} else if (child->type == XML_DTD_NODE) {
13491349
if (nodep->doc->intSubset != NULL) {

ext/dom/nodelist.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ enum dom_nodelist_dimension_index_type {
2323
DOM_NODELIST_DIM_LONG,
2424
};
2525

26-
typedef struct _dom_nodelist_dimension_index {
26+
typedef struct dom_nodelist_dimension_index {
2727
union {
2828
zend_long lval;
2929
zend_string *str;

0 commit comments

Comments
 (0)