[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libextractor - key-value pairs and mime types

From: madmurphy
Subject: Re: libextractor - key-value pairs and mime types
Date: Tue, 8 Feb 2022 18:21:15 +0000

Actually, the first thing that I thought when I read EXTRACTOR_METATYPE_RESERVED was “not used today, but tomorrow will be used for the book's cover” :)

It definitely needs a renaming!


On Tue, Feb 8, 2022 at 5:52 PM madmurphy <> wrote:

Of course, the value of EXTRACTOR_METATYPE_RESERVED would be even better (zero would be the natural value for something like this).

But then it's a lexical problem. If I see something marked as “reserved” I read “do not ever try to use this label”.

Since already libextractor uses EXTRACTOR_METATYPE_RESERVED with the meaning of EXTRACTOR_METATYPE_NONE, would it not make sense to rename EXTRACTOR_METATYPE_RESERVED to EXTRACTOR_METATYPE_NONE and tell the user that there is nothing “reserved” about it?

By instinct if I see a label named EXTRACTOR_METATYPE_RESERVED I might think that there are cases in which libextractor marks a metatype with EXTRACTOR_METATYPE_RESERVED, expecting me to treat is as an opaque label. Instead, EXTRACTOR_METATYPE_NONE to be usable requires libextractor never to mark anything publicly with it (or throw it as a return value). Since apparently this is the case, a comment similar to the one I had left in the patch would also be useful (“used by libextractor only internally; available to the user for marking an enum EXTRACTOR_MetaType as not carrying any meaningful value”).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]