From b60c835d346b7e214e627abd8e0cdf06932313a7 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sat, 27 Nov 2004 07:30:22 +0000 Subject: 2004-11-27 Havoc Pennington * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts are disabled (_dbus_string_get_const_data): inline when asserts are disabled * dbus/dbus-message.c: record the _dbus_current_generation of creation so we can complain if dbus_shutdown() is used improperly. Do this only if checks are enabled. * dbus/dbus-connection.c: ditto --- dbus/dbus-string.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dbus/dbus-string.c') diff --git a/dbus/dbus-string.c b/dbus/dbus-string.c index 87969912..627fbb06 100644 --- a/dbus/dbus-string.c +++ b/dbus/dbus-string.c @@ -471,6 +471,8 @@ _dbus_string_get_data (DBusString *str) return real->str; } +/* only do the function if we don't have the macro */ +#ifndef _dbus_string_get_const_data /** * Gets the raw character buffer from a const string. * @@ -484,6 +486,7 @@ _dbus_string_get_const_data (const DBusString *str) return real->str; } +#endif /* _dbus_string_get_const_data */ /** * Gets a sub-portion of the raw character buffer from the @@ -553,6 +556,8 @@ _dbus_string_set_byte (DBusString *str, real->str[i] = byte; } +/* only have the function if we didn't create a macro */ +#ifndef _dbus_string_get_byte /** * Gets the byte at the given position. It is * allowed to ask for the nul byte at the end of @@ -572,6 +577,7 @@ _dbus_string_get_byte (const DBusString *str, return real->str[start]; } +#endif /* _dbus_string_get_byte */ /** * Inserts a number of bytes of a given value at the -- cgit