summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-string.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2004-11-27 07:30:22 +0000
committerHavoc Pennington <hp@redhat.com>2004-11-27 07:30:22 +0000
commitb60c835d346b7e214e627abd8e0cdf06932313a7 (patch)
treec008f48c0c02ac878a4ff1400ee625805f496e16 /dbus/dbus-string.c
parent65090abbb9582d25a795f1dd835ea03973be75e7 (diff)
2004-11-27 Havoc Pennington <hp@redhat.com>
* 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
Diffstat (limited to 'dbus/dbus-string.c')
-rw-r--r--dbus/dbus-string.c6
1 files changed, 6 insertions, 0 deletions
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