[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-cvs
Subject:    [PHP-CVS] [php-src] master: Shrink libxml_doc_props struct (#11326)
From:       Niels Dossche via GitHub <noreply () php ! net>
Date:       2023-05-29 9:55:01
Message-ID: erDen2dAd7wSbH8uElJLqAzodTagJxhpc41BSjEem0 () main ! php ! net
[Download RAW message or body]

Author: Niels Dossche (nielsdos)
Committer: GitHub (web-flow)
Pusher: nielsdos
Date: 2023-05-29T11:41:42+02:00

Commit: https://github.com/php/php-src/commit/b8840115ffdd6b3d9e3554b5bf83b9e0a0638f4c
Raw diff: https://github.com/php/php-src/commit/b8840115ffdd6b3d9e3554b5bf83b9e0a0638f4c.diff

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.

Changed paths:
  M  ext/libxml/php_libxml.h


Diff:

diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h
index ff8a634e0cf9..de9b49d2ce3b 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 {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic