[Spice-devel] [PATCH spice-gtk 1/2] build-sys: fix compilation of bindings

Marc-André Lureau marcandre.lureau at gmail.com
Tue Mar 20 10:40:11 PDT 2012


Hide symbol from API to fix pygobject.

Also vapigen chokes on "record" typename

SpiceClientGtk-3.0.gir:32.55-32.55: error: The type name `Gtk.BoxClass' could not be found <type name="Gtk.BoxClass" c:type="GtkBoxClass"/>

This seems to be a bug in symbol lookup in vapigen. Using a struct
typedef solves it.
---
 gtk/usb-device-widget.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gtk/usb-device-widget.h b/gtk/usb-device-widget.h
index b0513c4..3920990 100644
--- a/gtk/usb-device-widget.h
+++ b/gtk/usb-device-widget.h
@@ -38,11 +38,11 @@ typedef struct _SpiceUsbDeviceWidgetClass SpiceUsbDeviceWidgetClass;
 typedef struct _SpiceUsbDeviceWidgetPrivate SpiceUsbDeviceWidgetPrivate;
 
 #if GTK_CHECK_VERSION(3,0,0)
-typedef GtkBox SpiceGtkBox;
-typedef GtkBoxClass SpiceGtkBoxClass;
+typedef struct _GtkBox _SpiceGtkBox;
+typedef struct _GtkBoxClass _SpiceGtkBoxClass;
 #else
-typedef GtkVBox SpiceGtkBox;
-typedef GtkVBoxClass SpiceGtkBoxClass;
+typedef struct _GtkVBox _SpiceGtkBox;
+typedef struct _GtkVBoxClass _SpiceGtkBoxClass;
 #endif
 
 /**
@@ -52,7 +52,7 @@ typedef GtkVBoxClass SpiceGtkBoxClass;
  */
 struct _SpiceUsbDeviceWidget
 {
-    SpiceGtkBox parent;
+    _SpiceGtkBox parent;
 
     /*< private >*/
     SpiceUsbDeviceWidgetPrivate *priv;
@@ -67,7 +67,7 @@ struct _SpiceUsbDeviceWidget
  */
 struct _SpiceUsbDeviceWidgetClass
 {
-    SpiceGtkBoxClass parent_class;
+    _SpiceGtkBoxClass parent_class;
 
     /* signals */
     void (*connect_failed) (SpiceUsbDeviceWidget *widget,
-- 
1.7.7.6



More information about the Spice-devel mailing list