On 24 June 2010 15:19, Magnus Fromreide <ma...@lysator.liu.se> wrote:
>> Firstly, I would regard  'range_list'  as an internal data structure,
>> rather than part of the public API, so it would be legitimate (IMO)
>> to tweak this as part of a new major release.
>
> I agree with this but think we should remove the struct from the public header
> in that case.

This is perhaps a matter of terminology,
but when I talk about "public API", I usually mean the routines and structures
defined in <net-snmp/*.h>.   These are the bits that we have made a
committment to maintain backward compatibility for.

Anything defined in <net-snmp/*/*.h> is part of the "internal API",
which is made accessible on an "at risk" basis.   Developers can
make use of these routines and structures, but on the understanding
that the details might change from one major release line to the next.
(We'd normally *try* to avoid making changes here too, but there isn't
the same committment to stability that there is with the core top-level API)

(There's then a "private API", which doesn't appear in the include subtree
at all - and can be changed at a whim!)

I know that some of the other developers will use different terminology
for these categories, and there's still no clear agreement as to exactly
what belongs where.
  The current *.h vs */*.h division is very much a first draft at
codifyinf this.

But that's my personal vision for the Net-SNMP APIs.



>> I suspect that what is probably needed is some form of flag within the
>> range_list structure, to indicate whether the values should be treated as
>> signed or unsigned (with appropriate casts if necessary).
>
> There already is a flag. Not in the range_list structure but in the associated
> type declaration. It is named 'type'.

Yup - that would work.
The type is certainly available to the _check_range call, so could be used
there.   The 'parse_range' routine doesn't currently have access to the
syntax of the object being parsed, but this is a purely private internal API
(defined 'static') within parse.c, so could easily be tweaked to include this
information.

Dave

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to