[pygobject] pygi-convert.sh: Don't convert glib -> GLib for now



commit e6fcafc6179e963cbae7774e7ee50415bde2c523
Author: Martin Pitt <martin pitt ubuntu com>
Date:   Wed Jan 19 17:03:06 2011 +0100

    pygi-convert.sh: Don't convert glib -> GLib for now
    
    This currently leads to a load of crashes, MemoryErrors, etc, as GLib is not
    very well introspectable, due to the low-level operations that it performs.
    
    John Palmieri confirms that using the static "glib" binding is preferred for
    now, so disable the replacement rules.

 pygi-convert.sh |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/pygi-convert.sh b/pygi-convert.sh
index a0d490e..ef1926c 100644
--- a/pygi-convert.sh
+++ b/pygi-convert.sh
@@ -145,15 +145,16 @@ for f in $FILES_TO_CONVERT; do
     -pe "s/Gio.OUTPUT_STREAM_SPLICE_/Gio.OutputStreamSpliceFlags./g;" \
     -pe "s/Gio.vfs_/Gio.Vfs./g;" \
 \
-    -pe "s/import glib\n/from gi.repository import GLib\n/g;" \
-    -pe "s/(?<!\.)glib\./GLib\./g;" \
-    -pe "s/GLib.IO_(ERR|HUP|IN|NVAL|OUT|PRI)/GLib.IOCondition./g;" \
-    -pe "s/GLib.IO_FLAG_/GLib.IOFlags./g;" \
-    -pe "s/GLib.IO_STATUS_/GLib.IOStatus./g;" \
-    -pe "s/GLib.OPTION_ERROR_/GLib.OptionError./g;" \
-    -pe "s/GLib.OPTION_FLAG_/GLib.OptionFlags./g;" \
-    -pe "s/GLib.SPAWN_/GLib.SpawnFlags./g;" \
-    -pe "s/GLib.USER_DIRECTORY_/GLib.UserDirectory.DIRECTORY_/g;" \
+    -pe "# GLib is not introspectable very well, for now we keep using the static bindings" \
+    -pe "#s/import glib\n/from gi.repository import GLib\n/g;" \
+    -pe "#s/(?<!\.)glib\./GLib\./g;" \
+    -pe "#s/GLib.IO_(ERR|HUP|IN|NVAL|OUT|PRI)/GLib.IOCondition./g;" \
+    -pe "#s/GLib.IO_FLAG_/GLib.IOFlags./g;" \
+    -pe "#s/GLib.IO_STATUS_/GLib.IOStatus./g;" \
+    -pe "#s/GLib.OPTION_ERROR_/GLib.OptionError./g;" \
+    -pe "#s/GLib.OPTION_FLAG_/GLib.OptionFlags./g;" \
+    -pe "#s/GLib.SPAWN_/GLib.SpawnFlags./g;" \
+    -pe "#s/GLib.USER_DIRECTORY_/GLib.UserDirectory.DIRECTORY_/g;" \
 \
     -pe "s/import hippo\n/from gi.repository import Hippo\n/g;" \
     -pe "s/hippo\./Hippo\./g;" \



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