diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-06-22 14:57:56 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-06-22 19:15:05 +0100 |
commit | 16b96009641749c600af28245f7f6f92bd53dcb8 (patch) | |
tree | 862b72b6ba5c93d152af1bdd26260680f6f64174 /dbus/dbus-string.h | |
parent | e3b9a0597c03afe1b3e2d27a16be4bbc85dcea3d (diff) | |
download | dbus-16b96009641749c600af28245f7f6f92bd53dcb8.tar.gz |
Remove maximum length field from DBusString
The source code says it's "a historical artifact from a feature that
turned out to be dumb". Respond accordingly!
This reduces sizeof (DBusString) by 20% on ILP32 architectures, which
can't hurt. (No reduction on LP64 architectures that align pointers
naturally, unfortunately.)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38570
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Diffstat (limited to 'dbus/dbus-string.h')
-rw-r--r-- | dbus/dbus-string.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/dbus/dbus-string.h b/dbus/dbus-string.h index 2f1ed31c..2f1fe878 100644 --- a/dbus/dbus-string.h +++ b/dbus/dbus-string.h @@ -48,11 +48,10 @@ struct DBusString #endif int dummy2; /**< placeholder */ int dummy3; /**< placeholder */ - int dummy4; /**< placeholder */ - unsigned int dummy5 : 1; /**< placeholder */ - unsigned int dummy6 : 1; /**< placeholder */ - unsigned int dummy7 : 1; /**< placeholder */ - unsigned int dummy8 : 3; /**< placeholder */ + unsigned int dummy_bit1 : 1; /**< placeholder */ + unsigned int dummy_bit2 : 1; /**< placeholder */ + unsigned int dummy_bit3 : 1; /**< placeholder */ + unsigned int dummy_bits : 3; /**< placeholder */ }; #ifdef DBUS_DISABLE_ASSERT @@ -324,7 +323,6 @@ void _dbus_string_zero (DBusString *str); sizeof(_dbus_static_string_##name), \ sizeof(_dbus_static_string_##name) + \ _DBUS_STRING_ALLOCATION_PADDING, \ - sizeof(_dbus_static_string_##name), \ TRUE, TRUE, FALSE, 0 } DBUS_END_DECLS |