Re: Figuring out wrapping errors



У чет, 06. 04 2006. у 08:29 +0200, Murray Cumming пише:
> > $ ~/prefix/lib/glibmm-2.4/proc/./gmmproc --unwrapped
> > recentfilter . ../gtkmm
> > Use of uninitialized value in concatenation (.) or string
> > at /home/marko/prefix/lib/glibmm-2.4/proc/pm/Enum.pm line 69.
> > --> GtkDefs.pm: Unhandled enum def ( "") (c-name "") ) in ::(in-module
> 
> Have you added something to the *_enums.defs file? Maybe it is badly
> formed, or somehow strange.

I generated new gtk_enums.defs, and it turned out that there was an
empty definition:

;; From /home/marko/cvs/gnome2/gtk+/gtk/gtktreeprivate.h

(define-flags-extended TreeViewFlags ... ;; this one's ok

(define-flags-extended 
  (in-module "")
  (c-name "")
  (values
    '("toggle" "GTK_TREE_SELECT_MODE_TOGGLE" "1 << 0")
    '("extend" "GTK_TREE_SELECT_MODE_EXTEND" "1 << 1")
  )
)

which should obviously be:

(define-flags-extended TreeSelectMode
  (in-module "Gtk")
  (c-name "GtkTreeSelectMode")
  (values
    '("toggle" "GTK_TREE_SELECT_MODE_TOGGLE" "1 << 0")
    '("extend" "GTK_TREE_SELECT_MODE_EXTEND" "1 << 1")
  )
)

which solves that part.

> > Use of uninitialized value in hash element
> > at /home/marko/prefix/lib/glibmm-2.4/proc/pm/GtkDefs.pm line 196.

This went away too.

Actually how could that happen? GtkTreeSelectMode is not new.

> > No conversion from GtkRecentFilterFlags to RecentFilterFlags defined
> > (line: , parameter name:
> > gtk_recent_filter_get_needed`'(ifelse(`1',1,const_cast<__CNAME__*>(gobj()),gobj())`'ifelse(`',,,`, ')))
> > m4 failed with exit code 1.  Aborting...
> > ---
> > 
> > where do I look to fix this? What does 'no conversion...' actually
> > mean,
> 
> It means that gmmproc tried to find a way to convert a
> GtkRecentFilterFlags to a RecentFilterFlags. The _CONVERSION() macros in
> tools/m4/convert_gtk.m4 tell it how to do this. You need to add one. Or
> in this case, I think there is a special macro there fore enums.

I added _CONV_ENUM(Gtk,RecentFilterFlags) to tools/m4/convert_gtk.m4
and updated the prefix, but I still get that error.
I do:

_WRAP_ENUM(RecentFilterFlags, GtkRecentFilterFlags)

but running gmmproc with that line or commented doesn't make
any difference in output(?).

Btw what do you mean by this comment (in convert_gtk.m4):
"# Enums: TODO: It would be nice if gmmproc knew about these
automatically." ?

Marko




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