[cc-devel] API changes for liblicense: drop ll_get_name() and friends

Peter Miller millerp at canb.auug.org.au
Tue Jan 8 05:54:35 EST 2008

On Mon, 2008-01-07 at 19:14 -0800, Asheesh Laroia wrote:
> We have some ll_get_* functions, like ll_get_name, ll_get_jurisdiction, 
> and ll_get_version, and also a general ll_get_attribute() function.  I 
> would like to remove the named ll_get_* functions and require users of the 
> license to use the ll_get_attribute(license_uri, LL_ATTRIBUTE_URI_PERMITS) 
> syntax.

I know I resisted before, but I've almost changed my mind.
Go ahead and nuke them.

> Impact on speed:
> * None: If you use our (e.g.) LL_ATTRIBUTE_URI_PERMITS constant, then we 
> can do a pointer equailty check instead of a string check, which is 
> practically free, so there should be no speed loss from switching to this.

I'd still use the strcmp, some folks do *really* dumb things.  And some
things that look dumb are not (e.g. behind a plugin for another
language, or swig, etc)

> I'm 
> okay with shortening e.g. LL_ATTRIBUTE_URI_REQUIRES to 

No shorter than LL_ATTR_REQUIRES please, need to emphasize that its only
useful as an apptibute name.  Reminding users it is also a URI wouldn't
be bad, so maybe LL_ATTR_URI_REQUIRES

One API change I'd very much like to see is to replace
ll_license_chooser_t with char** because (a) this is more consistent
with every other ll_ function, and (b) it makes more sense when talking
about the corresponding bitmap, and (c) the absence of a
ll_license_chooser_free function is less obvious.

Peter Miller <millerp at canb.auug.org.au>
/\/\*        http://miller.emu.id.au/pmiller/

PGP public key ID: 1024D/D0EDB64D
fingerprint = AD0A C5DF C426 4F03 5D53  2BDB 18D8 A4E2 D0ED B64D
See http://www.keyserver.net or any PGP keyserver for public key.

"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end." -- Henry Spencer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.ibiblio.org/pipermail/cc-devel/attachments/20080108/35cdf27b/attachment.bin 

More information about the cc-devel mailing list