dbus_message_get_array_len deprecated

Gustavo gugamilare at gmail.com
Wed Jun 4 15:00:12 PDT 2008


Hello,

In the libdbus documentation it says
(here<http://dbus.freedesktop.org/doc/dbus/api/html/group__DBusMessage.html#g576dc085c82c1c8e005f269f461daf24>)
that the function dbus_message_get_array_len is deprecated in the sense it
is "stupid". Well, is it really stupid? I am currently creating bindings for
the language Common Lisp (as I already told in another e-mail) and this
function allows me to create an array with the correct length before
inserting its contents (an array in Lisp don't care about the type of its
elements so it fits well in any case, even if the array element type isn't
"fixed"). It saves me the trouble of creating a list to acumulate values
(while counting them) and then creating the array with the contents of the
list, or the trouble of initially counting the elements, start all over and
only then create the array, inserting the values into it...

I am asking this just to be sure I am not doing anything wrong or
unnecessary. As I saw in the documentation of the protocol the length of the
array is always available before its contents.

Sincerely,
Gustavo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20080604/afecf9ba/attachment.html 


More information about the dbus mailing list