On Nov 1, 2008, at 4:18 PM, Per Øyvind Karlsen wrote:
>
> I guess you're commenting on the previous commit, and not this one? :)
>
Likely.
> I changed the type since I figured that it made the context and
> valid values more clear, while also
> nicer for debugging (ie. gdb displaying the enumated value ie. name
> such as RPMLOG_WARN rather
> than just the integer) and otherwise as you point out, it mostly
> doesn't matter :)
>
And I'm not disagreeing re "context" and/or "valid values" and/or (I'm
glad you've noticed)
debugging is way way easier with typedef'd enums.
But note rpmMireMode, what could be easier or more innocent than an
enum, right?
Wrong. Once the enum gets used in a prototype, then the typedef needs to
be included for rpmdb.h. Which drags mire.h into rpm's API for no
particularly
important reason. For many reasons, I'd like mire.h to be stand-alone
with the
typedef''d enum within mire.h. And for other, conflicting reasons, I'd
like
not to expose an API that may (or may not) include functionality like
PCRE,
because PCRE cannot be used unless --with-pcre is included.
I don't pretend to have answers here.
> For URPMI usage of rpmlog, I doubt it using the typedef'd type, this
> was a purely URPMI non-related commit. ;)
>
Good.
73 de Jeff
Received on Sat Nov 1 21:54:00 2008