openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Williams <patrick@stwcx.xyz>
To: OpenBMC List <openbmc@lists.ozlabs.org>
Subject: Re: sdbusplus: size/ssize types and 'object_path' type.
Date: Thu, 8 Oct 2020 11:18:44 -0500	[thread overview]
Message-ID: <20201008161844.GK6152@heinlein> (raw)
In-Reply-To: <20200915190230.GB6152@heinlein>

[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2020-10-08 16:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 19:02 sdbusplus: size/ssize types and 'object_path' type Patrick Williams
2020-10-08 16:18 ` Patrick Williams [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201008161844.GK6152@heinlein \
    --to=patrick@stwcx.xyz \
    --cc=openbmc@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).