Skip to content

Commit 89ea24f

Browse files
authored
Give anonymous dom structs a name (#13135)
1 parent 90785dd commit 89ea24f

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

ext/dom/element.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ PHP_METHOD(DOMElement, setAttribute)
418418
}
419419
/* }}} end dom_element_set_attribute */
420420

421-
typedef struct {
421+
typedef struct _dom_deep_ns_redef_item {
422422
xmlNodePtr current_node;
423423
xmlNsPtr defined_ns;
424424
} dom_deep_ns_redef_item;

ext/dom/html5_parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
/* libxml2 reserves 2 pointer-sized words for interned strings */
3434
#define LXML_INTERNED_STRINGS_SIZE (sizeof(void *) * 2)
3535

36-
typedef struct {
36+
typedef struct _work_list_item {
3737
lxb_dom_node_t *node;
3838
uintptr_t current_active_namespace;
3939
xmlNodePtr lxml_parent;

ext/dom/html5_parser.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ typedef void (*lexbor_libxml2_bridge_tree_error_reporter)(
4242
size_t len
4343
);
4444

45-
typedef struct {
45+
typedef struct _lexbor_libxml2_bridge_extracted_observations {
4646
bool has_explicit_html_tag;
4747
bool has_explicit_head_tag;
4848
bool has_explicit_body_tag;
4949
} lexbor_libxml2_bridge_extracted_observations;
5050

51-
typedef struct {
51+
typedef struct _lexbor_libxml2_bridge_parse_context {
5252
/* Private fields */
5353
lexbor_libxml2_bridge_tokenizer_error_reporter tokenizer_error_reporter;
5454
lexbor_libxml2_bridge_tree_error_reporter tree_error_reporter;

ext/dom/html_document.c

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

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

41-
typedef struct {
41+
typedef struct _dom_lexbor_libxml2_bridge_application_data {
4242
const char *input_name;
4343
const lxb_codepoint_t *current_input_codepoints;
4444
const char *current_input_characters;
@@ -48,14 +48,14 @@ typedef struct {
4848
bool html_no_implied;
4949
} dom_lexbor_libxml2_bridge_application_data;
5050

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

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

58-
typedef struct {
58+
typedef struct _dom_output_ctx {
5959
const lxb_encoding_data_t *encoding_data;
6060
const lxb_encoding_data_t *decoding_data;
6161
lxb_encoding_encode_t *encode;
@@ -66,7 +66,7 @@ typedef struct {
6666
dom_write_output write_output;
6767
} dom_output_ctx;
6868

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

0 commit comments

Comments
 (0)