From 208188f630b3859a1f6d460c51311639844c6d93 Mon Sep 17 00:00:00 2001 From: nielsdos <7771979+nielsdos@users.noreply.github.com> Date: Fri, 26 May 2023 22:43:05 +0200 Subject: [PATCH] Shrink libxml_doc_props struct These values are only ever bools, store them as bools. Reduces the size from 40 bytes to 16 bytes on my system. --- ext/libxml/php_libxml.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h index ff8a634e0cf9b..de9b49d2ce3b6 100644 --- a/ext/libxml/php_libxml.h +++ b/ext/libxml/php_libxml.h @@ -47,14 +47,14 @@ ZEND_BEGIN_MODULE_GLOBALS(libxml) ZEND_END_MODULE_GLOBALS(libxml) typedef struct _libxml_doc_props { - int formatoutput; - int validateonparse; - int resolveexternals; - int preservewhitespace; - int substituteentities; - int stricterror; - int recover; HashTable *classmap; + bool formatoutput; + bool validateonparse; + bool resolveexternals; + bool preservewhitespace; + bool substituteentities; + bool stricterror; + bool recover; } libxml_doc_props; typedef struct _php_libxml_ref_obj {