Ethereal-dev: Re: [Ethereal-dev] Why does prefs_register_enum_preference use type gint and not

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Mon, 27 Dec 2004 02:50:32 -0800
Ulf Lamping wrote:

Is there a reason, that the var parameter of the prefs_register_enum_preference() function in epan/prefs.h is of type gint and not of type enum (as I would expected it)?

"enum" isn't a type, it's a class of types, just as "struct" and "union" are. You can't declare something as just an "enum", you'd have to declare it as being a *particular* enum - and for enumerated preferences, there's no single type of enum that'd be appropriate, the type would depend on the preference.