mirror of
https://github.com/json-c/json-c.git
synced 2026-03-30 02:19:06 +08:00
json_object_private: save 8 bytes in struct json_object in 64-bit architectures
- there is no need for _ref_count to be uint_fast32_t (the compiler might decide to use a 64-bit int). make it uint32_t instead. - reorder the 32-bit integer fields (o_type and _ref_count) so that there is no wasted 4-byte gap after each of them.
This commit is contained in:
@@ -27,9 +27,9 @@ typedef void (json_object_private_delete_fn)(struct json_object *o);
|
||||
struct json_object
|
||||
{
|
||||
enum json_type o_type;
|
||||
uint32_t _ref_count;
|
||||
json_object_private_delete_fn *_delete;
|
||||
json_object_to_json_string_fn *_to_json_string;
|
||||
uint_fast32_t _ref_count;
|
||||
struct printbuf *_pb;
|
||||
union data {
|
||||
json_bool c_boolean;
|
||||
|
||||
Reference in New Issue
Block a user