can/should mkheader emit funcptrs separately?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lsb |
In Progress
|
Medium
|
Unassigned | ||
Mandriva |
In Progress
|
Medium
|
Bug Description
In current in-progress fixup of gtk3 import, there are a lot of ordering
problems. Here are some samples:
/opt/lsb/
‘GtkWidget’
/opt/lsb/
‘GtkTreeSelection’
/opt/lsb/
‘GtkTreeModel’
/opt/lsb/
‘GtkTreePath’
/opt/lsb/
‘GtkTreeModel’
/opt/lsb/
‘GtkTreePath’
/opt/lsb/
‘GtkTreeIter’
/opt/lsb/
‘GtkCellRenderer’
/opt/lsb/
‘GtkTreeModel’
/opt/lsb/
‘GtkTreeIter’
794 typedef gint(*GtkKeySno
795 GdkEventKey * event,
796 gpointer func_data);
826 typedef struct _GtkWidget GtkWidget;
848 typedef gboolean(
selection,
849 GtkTreeModel * model,
850 GtkTreePath * path,
851 gboolean
852 path_currently_
853 gpointer data);
854
855 typedef void (*GtkTreeSelect
856 GtkTreePath * path,
857 GtkTreeIter * iter,
858 gpointer data);
878 typedef void (*GtkTreeCellDa
879 GtkCellRenderer * cell,
880 GtkTreeModel * tree_model,
881 GtkTreeIter * iter,
882 gpointer data);
1335 typedef struct _GtkCellRenderer GtkCellRenderer;
2221 typedef struct _GtkTreeSelection GtkTreeSelection;
2289 typedef struct _GtkTreeIter GtkTreeIter;
2291 typedef struct _GtkTreePath GtkTreePath;
2295 typedef struct _GtkTreeModel GtkTreeModel;
So this problem has nothing to do with structure /contents/ being
defined or not, just a use-before-define problem for typedefs.
Function prototypes are already emitted at the end of the header by
mkheader, so the problem appears to be entirely the definition of
function-pointer types. mkheader already knows these are complex,
it includes this comment:
# We can have long chains of inheritance with FuncPtr base (e.g. typedef
# to pointer to FuncPtr) such types cannot be processed in a usual way
Maybe there should be another step as well, to save these up and emit them
at the end so they follow the type definitions? Or perhaps there's some
more ordering decisions that can be made to sort this out.
I believe this could also be solved by HeaderGroups, simply assigning
all the function-pointer types to a header-group that comes after the
default one (in both the 2.0 and 3.0 gtk imports, the main headers,
gtk.h and gdk.h, are not split into headergroups at all at the moment).
But it would be nice if we didn't have to do that and mkheader could
somehow take care of it...
Changed in mandriva: | |
importance: | Unknown → Medium |
status: | Unknown → In Progress |
tags: | added: database infra rpm |
tags: | added: gtk3 zclose |