Skip to content

Commit b884011

Browse files
authored
Shrink libxml_doc_props struct (#11326)
These values are only ever bools, store them as bools. Reduces the size from 40 bytes to 16 bytes on my system.
1 parent 2d883a6 commit b884011

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ext/libxml/php_libxml.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ ZEND_BEGIN_MODULE_GLOBALS(libxml)
4747
ZEND_END_MODULE_GLOBALS(libxml)
4848

4949
typedef struct _libxml_doc_props {
50-
int formatoutput;
51-
int validateonparse;
52-
int resolveexternals;
53-
int preservewhitespace;
54-
int substituteentities;
55-
int stricterror;
56-
int recover;
5750
HashTable *classmap;
51+
bool formatoutput;
52+
bool validateonparse;
53+
bool resolveexternals;
54+
bool preservewhitespace;
55+
bool substituteentities;
56+
bool stricterror;
57+
bool recover;
5858
} libxml_doc_props;
5959

6060
typedef struct _php_libxml_ref_obj {

0 commit comments

Comments
 (0)