introspection (and python bindings): callbacks with GError** parameter?

Dear gobject-introspection hackers,

I am trying to use some GdkPixbuf methods from Python via PyGI and ran
into something that made me wonder.

I already wrote to the python-hackers list (pygobject devs) about this
issue yesterday:

Since I didn't get an response yet, I started looking into the issue a
bit myself.

In the GIR constructors and methods with a GError** parameter don't get
this parameter listed explicitly, instead the XML type get the magic
attribute 'throws="1"'.

Now, the callback "PixbufSaveFunc" didn't get one (note: this is the one
where I already played with the anootations):

    <callback name="PixbufSaveFunc" c:type="GdkPixbufSaveFunc">
      <return-value transfer-ownership="none">   
        <type name="gboolean" c:type="gboolean"/>
        <parameter name="buf" transfer-ownership="none">
          <type name="utf8" c:type="gchar*"/>
        <parameter name="count" transfer-ownership="none">
          <type name="gsize" c:type="gsize"/>
        <parameter name="error"   
          <type name="GLib.Error" c:type="GError**"/>
        <parameter name="data" transfer-ownership="none" closure="3">
          <type name="gpointer" c:type="gpointer"/>

It seems like there is no reason a callback could not also have a
"throws" attribute.  However, there is the "data" parameter coming after
the GError** and presumably the GError** should be last.

So am I wondering how this case should be dealt with at all... maybe a
small brain teaser for you guys. :)



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