]> granicus.if.org Git - json-c/commit
json_object_private: save 8 bytes in struct json_object in 64-bit architectures
authorRamiro Polla <ramiro.polla@gmail.com>
Sat, 24 Nov 2018 02:36:51 +0000 (03:36 +0100)
committerRamiro Polla <ramiro.polla@gmail.com>
Sat, 24 Nov 2018 03:16:36 +0000 (04:16 +0100)
commit5bb5e2e8fcf9f1b9ae4562c2bc08929317068f78
treeca28aadee6d83a0fe79d3228727a38a8b7bb508a
parentebe520e96e4c469802cbe3adeb0a62861b7c564c
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.
json_object.c
json_object_private.h