1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

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.
This commit is contained in:
Anatol Belski
2017-07-28 20:02:26 +02:00
parent 095d763f99
commit 853e73fb8e

View File

@@ -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)