sdbusplus: size/ssize types and 'object_path' type.

Patrick Williams patrick at stwcx.xyz
Fri Oct 9 03:18:44 AEDT 2020


On Tue, Sep 15, 2020 at 02:02:31PM -0500, Patrick Williams wrote:
> 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.
> 
> 1. https://github.com/openbmc/sdbusplus/commit/4ac7e56e8e18202fad3b2734346c6d4c7a6957fc

It was mentioned to me in a code review for PDI that there was some
problem taking advantage of 'size_t/ssize_t' type properties when the
interface already had a 'uint32_t/int32_t' type property.  I've
identified the underlying problem and fixed it with this commit:

    https://gerrit.openbmc-project.xyz/c/openbmc/sdbusplus/+/37227

-- 
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/20201008/2960a40f/attachment.sig>


More information about the openbmc mailing list