Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jul 2013 17:03:08 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        arch@FreeBSD.org
Subject:   Re: General purpose library for name/value pairs.
Message-ID:  <20130708150308.GE1383@garage.freebsd.pl>
In-Reply-To: <60317.1373055040@critter.freebsd.dk>
References:  <20130704215329.GG1402@garage.freebsd.pl> <4818.1373008073@critter.freebsd.dk> <20130705195255.GB25842@garage.freebsd.pl> <60317.1373055040@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help

--SxgehGEc6vB0cZwN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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.

--=20
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://mobter.com

--SxgehGEc6vB0cZwN
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)

iEYEARECAAYFAlHa1KwACgkQForvXbEpPzS0vACeP15MUHex5woR6unjTxJJvY1a
WVIAn2TKsIXfymYPYLIPeVJ0Ua90afx9
=1tzW
-----END PGP SIGNATURE-----

--SxgehGEc6vB0cZwN--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130708150308.GE1383>