diff options
author | Erik Olsson <erik.eo.olsson@gmail.com> | 2021-01-16 22:17:51 +0100 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2021-01-20 22:52:34 -0500 |
commit | 0a5827571f97feded67d6abc837c332224917f75 (patch) | |
tree | ce65e4f8137b34233aa9a6287b44fb5a7f9b13dc /lib/mime.h | |
parent | 46f4736356a436dfb0fd26f41e63f6dd76514f53 (diff) | |
download | curl-0a5827571f97feded67d6abc837c332224917f75.tar.gz |
lib: save a bit of space with some structure packing
- Reorder some internal struct members so that less padding is used.
This is an attempt at saving a bit of space by packing some structs
(using pahole to find the holes) where it might make sense to do
so without losing readability.
I.e., I tried to avoid separating fields that seem grouped
together (like the cwd... fields in struct ftp_conn for instance).
Also abstained from touching fields behind conditional macros as
that quickly can get complicated.
Closes https://github.com/curl/curl/pull/6483
Diffstat (limited to 'lib/mime.h')
-rw-r--r-- | lib/mime.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mime.h b/lib/mime.h index ab89d5251..e44f0f33f 100644 --- a/lib/mime.h +++ b/lib/mime.h @@ -110,6 +110,7 @@ struct curl_mimepart { curl_mime *parent; /* Parent mime structure. */ curl_mimepart *nextpart; /* Forward linked list. */ enum mimekind kind; /* The part kind. */ + unsigned int flags; /* Flags. */ char *data; /* Memory data or file name. */ curl_read_callback readfunc; /* Read function. */ curl_seek_callback seekfunc; /* Seek function. */ @@ -122,7 +123,6 @@ struct curl_mimepart { char *filename; /* Remote file name. */ char *name; /* Data name. */ curl_off_t datasize; /* Expected data size. */ - unsigned int flags; /* Flags. */ struct mime_state state; /* Current readback state. */ const struct mime_encoder *encoder; /* Content data encoder. */ struct mime_encoder_state encstate; /* Data encoder state. */ |