On Mon, Aug 6, 2012 at 2:42 PM, Darryl L. Pierce <dpie...@redhat.com> wrote:

> In writing the swing contracts for the Proton APIs, I've come across a
> few inconsistencies with the way state and return values are declared.
> In sasl.h the pn_sasl_state_t and pn_sasl_outcome_t values are declared
> using enums. Similarly, in engine.h the pn_disposition_t type is
> declared using an enum.
> But pn_state_t values are defined using precompiler defines, same with
> pn_trace_t values and specific error codes.
> I know there are reasons to do things certain ways, but what I'd like to
> know is: can we move the enums to being defined values instead? The
> reason I ask is that I can then provide better support in the language
> binding contracts. Contracts can't handle enumeration values but can be
> told what values are allowed for the other types.

The extra compiler checking you get with the enums is kind of nice from an
API perspective. What exactly is the problem with enum values in the


Reply via email to