summaryrefslogtreecommitdiff
path: root/Zend/zend_ini.h
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-07-28 20:02:26 +0200
committerAnatol Belski <ab@php.net>2017-07-28 20:02:26 +0200
commit853e73fb8e70f7d4a74d3a90f2d981da09b21640 (patch)
tree898f3c446eab905eb784b434066920ee22421beb /Zend/zend_ini.h
parent095d763f998970ba999801b26d963b580debb037 (diff)
downloadphp-git-853e73fb8e70f7d4a74d3a90f2d981da09b21640.tar.gz
Reduce struct size, on 64-bit by 8 bytes each
Note, the max modifiable flag value is currently 1<<5, there is still some space. ATM it looks unlikely, but should more flags need to be added, the types will need to be reconsidered.
Diffstat (limited to 'Zend/zend_ini.h')
-rw-r--r--Zend/zend_ini.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/Zend/zend_ini.h b/Zend/zend_ini.h
index 41d38adcef..7c4fa39025 100644
--- a/Zend/zend_ini.h
+++ b/Zend/zend_ini.h
@@ -38,10 +38,10 @@ typedef struct _zend_ini_entry_def {
void *mh_arg3;
const char *value;
void (*displayer)(zend_ini_entry *ini_entry, int type);
- int modifiable;
- uint32_t name_length;
uint32_t value_length;
+ uint16_t name_length;
+ uint8_t modifiable;
} zend_ini_entry_def;
struct _zend_ini_entry {
@@ -53,11 +53,13 @@ struct _zend_ini_entry {
zend_string *value;
zend_string *orig_value;
void (*displayer)(zend_ini_entry *ini_entry, int type);
- int modifiable;
- int orig_modifiable;
- int modified;
int module_number;
+
+ uint8_t modifiable;
+ uint8_t orig_modifiable;
+ uint8_t modified;
+
};
BEGIN_EXTERN_C()
@@ -97,7 +99,7 @@ END_EXTERN_C()
#define ZEND_INI_END() { NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0} };
#define ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, arg2, arg3, displayer) \
- { name, on_modify, arg1, arg2, arg3, default_value, displayer, modifiable, sizeof(name)-1, sizeof(default_value)-1 },
+ { name, on_modify, arg1, arg2, arg3, default_value, displayer, sizeof(default_value)-1, sizeof(name)-1, modifiable },
#define ZEND_INI_ENTRY3(name, default_value, modifiable, on_modify, arg1, arg2, arg3) \
ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, arg2, arg3, NULL)