On Thu, 2015-05-07 at 15:53 -0400, Rafael Schloming wrote:
> I believe where we ended up was standardizing on a single snprintf-style
> signature for all encode functions, i.e.:
> 
>     // always returns encoded size, never overwrites limit, pass in NULL, 0
> to compute size in advance
>     // returns < 0 if there was an actual error of some sort, e.g. xxx_t
> cannot be validly encoded for some reason
>     ssize_t pn_xxx_encode(xxx_t, char *buf, size_t limit);
> 
> And transitioning to this with a feature macro.

I'm good with sprintf-style.

I'm not sure what you mean by a feature macro. Does that addresses
binary compatibility or is just a source-level switch? If we break
binary compatibility we need to make sure we bump the library version
appropriately to avoid breaking existing apps. If we set the switch to
default to the new behavior we should make sure the compiler barfs on
old code and it's fairly obvious what to do about it.

Cheers,
Alan.

> 
> --Rafael
> 
> On Thu, May 7, 2015 at 3:28 PM, Andrew Stitcher <astitc...@redhat.com>
> wrote:
> 
> > On Wed, 2015-05-06 at 14:03 -0400, Rafael Schloming wrote:
> > > We seem to have reached consensus here, but I haven't seen any commits on
> > > this. We should probably fix this before 0.10 so we don't end up putting
> > > out a new API and then deprecating it in the next release. Is anyone
> > > actually working on this?
> >
> > Could you articulate the consensus then.
> >
> > Asserting "we have reached consensus" without explicitly stating what
> > you think the consensus to be is remarkably likely to be proven wrong by
> > subsequent events!
> >
> > Andrew
> >
> >
> >


Reply via email to