sdbusplus: size/ssize types and 'object_path' type.
Patrick Williams
patrick at stwcx.xyz
Wed Sep 16 05:02:30 AEST 2020
Hello,
For the sdbus++ interface YAML files we use in phosphor-dbus-interfaces,
I recently added support for 'size' and 'ssize' types[1]. I did this
because I've seen many cases where there was some discussion on
appropriate integer sizes for countable items (ex. uint8 vs uint32 vs
uint64). Generally, in C++ we recommend size_t/ssize_t as the most
appropriate type for countable items (and anything else is likely a
premature optimization). We should now take this same approach in PDI
interfaces.
Another minor change[2] is I added 'object_path' as a type alias to what
was previously just 'path'. The name 'object_path' is what the DBus
specification calls this type, so I think that name is more obvious for
sdbus++ to also use. Both 'path' and 'object_path' currently resolve to
the same type, but I'll probably also start switching PDI interfaces
over to the longer 'object_path' type name.
1. https://github.com/openbmc/sdbusplus/commit/4ac7e56e8e18202fad3b2734346c6d4c7a6957fc
2. https://github.com/openbmc/sdbusplus/commit/d5ce346c434705180d0cbe25686d51630681ba4b
--
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200915/af04b6f3/attachment.sig>
More information about the openbmc
mailing list