General purpose library for name/value pairs.

Pawel Jakub Dawidek pjd at FreeBSD.org
Mon Jul 8 15:02:41 UTC 2013


On Fri, Jul 05, 2013 at 08:10:40PM +0000, Poul-Henning Kamp wrote:
> Maybe the basic n/v should just do strings, and interpretation of
> strings be a layer above ?

How about instead of supporting int8, uint8, int16, uint16, int32,
uint32, int64 and uint64 I'd just support 'number' type, which would be
uint64_t. This shouldn't break transporting signed values and because I
don't support basic types like int, long, etc. casting or conversion has
to be done anyway. This would reduce number of supported types to:

	NV_TYPE_NULL
	NV_TYPE_BOOL
	NV_TYPE_NUMBER
	NV_TYPE_STRING
	NV_TYPE_NVLIST
	NV_TYPE_DESCRIPTOR
	NV_TYPE_BOOL_ARRAY
	NV_TYPE_NUMBER_ARRAY
	NV_TYPE_STRING_ARRAY
	NV_TYPE_NVLIST_ARRAY
	NV_TYPE_DESCRIPTOR_ARRAY

So 11 types down from 25 types.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://mobter.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20130708/44886739/attachment.sig>


More information about the freebsd-arch mailing list