Bug 326846 - expose goption parsing hook in GnomeModuleInfo?
expose goption parsing hook in GnomeModuleInfo?
Status: RESOLVED FIXED
Product: libgnome
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal blocker
: 2.14.x
Assigned To: libgnome maintainer
libgnome maintainer
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2006-01-13 14:11 UTC by Christian Persch
Modified: 2006-01-17 00:25 UTC (History)
1 user (show)

See Also:
GNOME target: ---
GNOME version: ---


Attachments

Description Christian Persch 2006-01-13 14:11:25 UTC
With bug 307312 and bug 326237, we now make use of the "gpointer expansion1" expansion slot in the GnomeModuleInfo structure.
It is however not used as a gpointer, but as a function pointer of type GOptionGroup *(*func)(void).
The question is now if we should instead

typedef GOptionGroup * (* GnomeModuleGetOptionGroupFunc) (void);

and replace
gpointer expansion1;
with
GnomeModuleGetOptionGroupFunc get_option_group;
in the GnomeModuleInfo structure.

I think this does not change the struct size and should therefore not be ABI-incompatible; and the API change doesn't matter since the expansion1 slot was reserved before.
Comment 1 Christian Persch 2006-01-13 14:12:02 UTC
We need to decide this before API freeze.
Comment 2 Kjartan Maraas 2006-01-15 16:35:04 UTC
I think this should probably be asked on d-d-l instead to be sure that the right people to comment are reached.
Comment 5 Emmanuele Bassi (:ebassi) 2006-01-17 00:25:31 UTC
it surely does not break the ABI (we use this very same method elsewhere).

It breaks the API, but is like an addition, since the gpointer was reserved for future expansion.

I've applied all three patches, with a slight change in libgnome - I've removed the conditional inclusion of popt.h, otherwise we broke every user of gnome-program.h that didn't include popt.h itself *before* any libgnome header.

Note You need to log in before you can comment on or make changes to this bug.