diff options
author | Aleksandar Kanchev <kanchev@itestra.com> | 2012-07-09 18:09:04 +0200 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2015-09-08 19:55:15 +0100 |
commit | 6b265f7e2ce10e69a07d4a6bc4ec2746fb032135 (patch) | |
tree | 4afceb380181d067f32cc48b1dca00c636e7464b /dbus/dbus-string.h | |
parent | d2236978c0f3868a3ace3b575dd0631f91c4e064 (diff) | |
download | dbus-6b265f7e2ce10e69a07d4a6bc4ec2746fb032135.tar.gz |
DBusMessage: add support for custom marshalingbaserock/v1.10.0+custom_marshaling
Add functions to support querying and manipulating the message body and
signature. This is useful for code generators, which can generate custom
marshaling functions based on a given IDL. Those functions tend to be
optimized and faster than the generic iterator based marshaling.
Diffstat (limited to 'dbus/dbus-string.h')
-rw-r--r-- | dbus/dbus-string.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dbus/dbus-string.h b/dbus/dbus-string.h index adf709bd..37ec4d5f 100644 --- a/dbus/dbus-string.h +++ b/dbus/dbus-string.h @@ -61,6 +61,7 @@ struct DBusString */ #define _dbus_string_get_data(s) ((char*)(((DBusString*)(s))->dummy1)) #define _dbus_string_get_length(s) (((DBusString*)(s))->dummy2) +#define _dbus_string_get_allocated(s) (((DBusString*)(s))->dummy3 - _DBUS_STRING_ALLOCATION_PADDING) #define _dbus_string_set_byte(s, i, b) ((((unsigned char*)(((DBusString*)(s))->dummy1))[(i)]) = (unsigned char) (b)) #define _dbus_string_get_byte(s, i) (((const unsigned char*)(((DBusString*)(s))->dummy1))[(i)]) #define _dbus_string_get_const_data(s) ((const char*)(((DBusString*)(s))->dummy1)) @@ -150,6 +151,9 @@ void _dbus_string_copy_to_buffer_with_nul (const DBusString *str, DBUS_PRIVATE_EXPORT int _dbus_string_get_length (const DBusString *str); #endif /* !_dbus_string_get_length */ +#ifndef _dbus_string_get_allocated +int _dbus_string_get_allocated (const DBusString *str); +#endif /* !_dbus_string_get_allocated */ /** * Get the string's length as an unsigned integer, for comparison with |