diff options
author | Anders Carlsson <andersca@codefactory.se> | 2003-02-21 20:51:34 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@codefactory.se> | 2003-02-21 20:51:34 +0000 |
commit | 92f7d50b3b420670732a55bf15f7b343b2ce9fe6 (patch) | |
tree | 9ebb3ff7f3ae264be54b6336cbf1ae192340d7dc /dbus/dbus-memory.c | |
parent | fdb3ecc33366edc475e684baa8adb3c933563f0d (diff) |
2003-02-21 Anders Carlsson <andersca@codefactory.se>
* dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
Make string arrays NULL-terminated.
* dbus/dbus-memory.c: (dbus_free_string_array):
* dbus/dbus-memory.h:
New function for freeing NULL-terminated string arrays.
* dbus/dbus-message-builder.c: (append_quoted_string),
(_dbus_message_data_load):
Add support for array types.
* dbus/dbus-message.c: (check_message_handling):
Add more types as test cases.
* dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
(_dbus_string_parse_double):
Add the start offset to the end offset.
* test/data/valid-messages/lots-of-arguments.message:
New test message with lots of arguments.
Diffstat (limited to 'dbus/dbus-memory.c')
-rw-r--r-- | dbus/dbus-memory.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/dbus/dbus-memory.c b/dbus/dbus-memory.c index 11489c78..14ce23d8 100644 --- a/dbus/dbus-memory.c +++ b/dbus/dbus-memory.c @@ -220,4 +220,28 @@ dbus_free (void *memory) free (memory); } +/** + * Frees a #NULL-terminated array of strings. + * If passed #NULL, does nothing. + * + * @param str_array the array to be freed + */ +void +dbus_free_string_array (char **str_array) +{ + if (str_array) + { + int i; + + i = 0; + while (str_array[i]) + { + dbus_free (str_array[i]); + i++; + } + + dbus_free (str_array); + } +} + /** @} */ |