Gentoo Archives: gentoo-dev

From: Ciaran McCreesh <ciaranm@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] versionator negative indices
Date: Sun, 12 Mar 2006 17:04:15
Message-Id: 20060312164202.3e450fb3@snowdrop.home
1 There have been a few requests for negative indices in versionator,
2 where -1 would mean "the last component". This conflicts with the range
3 syntax, however, so the meaning of things like -2 would be inconsistent
4 between functions.
5
6 However... Getting the last index seems to be something that's needed
7 often enough to warrant a proper solution. The attached implements
8 get_version_component_count and get_last_version_component_index.
9 Thoughts?
10
11 --
12 Ciaran McCreesh : Gentoo Developer (Wearer of the shiny hat)
13 Mail : ciaranm at gentoo.org
14 Web : http://dev.gentoo.org/~ciaranm

Attachments

File name MIME type
versionator-counts.patch text/x-patch
signature.asc application/pgp-signature