Skip to content

Commit 8736342

Browse files
committed
Pack dom_nnodemap_object fields together with a union that can't be active at the same time
1 parent 26aea0e commit 8736342

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

ext/dom/obj_map.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,14 @@ typedef struct dom_nnodemap_object {
3232
dom_object *baseobj;
3333
zval baseobj_zv;
3434
zend_long cached_length;
35-
xmlHashTable *ht;
36-
xmlChar *local;
37-
zend_string *local_lower;
38-
xmlChar *ns;
35+
union {
36+
xmlHashTable *ht;
37+
struct {
38+
xmlChar *local;
39+
zend_string *local_lower;
40+
xmlChar *ns;
41+
};
42+
};
3943
php_libxml_cache_tag cache_tag;
4044
dom_object *cached_obj;
4145
zend_long cached_obj_index;

0 commit comments

Comments
 (0)