[pygobject] Split overrides for gio.MemoryOutputStream



commit 6eb5e3988cbddb4afb3d5747364d6eb80370bb78
Author: Gian Mario Tagliaretti <gianmt gnome org>
Date:   Mon Jun 8 13:30:15 2009 +0200

    Split overrides for gio.MemoryOutputStream
---
 gio/Makefile.am                  |    1 +
 gio/gio.override                 |    1 +
 gio/gmemoryoutputstream.override |   45 ++++++++++++++++++++++++++++++++++++++
 gio/goutputstream.override       |   24 --------------------
 4 files changed, 47 insertions(+), 24 deletions(-)

diff --git a/gio/Makefile.am b/gio/Makefile.am
index ae1613e..ccb8000 100644
--- a/gio/Makefile.am
+++ b/gio/Makefile.am
@@ -49,6 +49,7 @@ GIO_OVERRIDES = 			\
 	gicon.override			\
 	ginputstream.override 		\
 	gmemoryinputstream.override	\
+	gmemoryoutputstream.override	\
 	gmount.override			\
 	goutputstream.override 		\
 	gvolume.override		\
diff --git a/gio/gio.override b/gio/gio.override
index ac0515e..3363a0f 100644
--- a/gio/gio.override
+++ b/gio/gio.override
@@ -240,6 +240,7 @@ include
   gfileoutputstream.override
   gicon.override
   gmemoryinputstream.override
+  gmemoryoutputstream.override
   gmount.override
   ginputstream.override
   goutputstream.override
diff --git a/gio/gmemoryoutputstream.override b/gio/gmemoryoutputstream.override
new file mode 100644
index 0000000..7614045
--- /dev/null
+++ b/gio/gmemoryoutputstream.override
@@ -0,0 +1,45 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008  Johan Dahlin
+ *
+ *   gmemoryoutputstream.override: module overrides for GMemoryOutputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_memory_output_stream_new noargs
+static int
+_wrap_g_memory_output_stream_new(PyGObject *self)
+{
+    self->obj = (GObject *)g_memory_output_stream_new(NULL, 0, g_realloc, g_free);
+
+    if (!self->obj) {
+        PyErr_SetString(PyExc_RuntimeError, "could not create gio.MemoryOutputStream object");
+        return -1;
+    }
+
+    pygobject_register_wrapper((PyObject *)self);
+    return 0;
+}
+%%
+override g_memory_output_stream_get_data noargs
+static PyObject *
+_wrap_g_memory_output_stream_get_data(PyGObject *self)
+{
+    GMemoryOutputStream *stream = G_MEMORY_OUTPUT_STREAM(self->obj);
+    return PyString_FromStringAndSize(g_memory_output_stream_get_data(stream),
+				      g_seekable_tell(G_SEEKABLE(stream)));
+}
diff --git a/gio/goutputstream.override b/gio/goutputstream.override
index e28a3d0..337a84c 100644
--- a/gio/goutputstream.override
+++ b/gio/goutputstream.override
@@ -186,30 +186,6 @@ _wrap_g_output_stream_close_async(PyGObject *self,
   return NULL;
 }
 %%
-override g_memory_output_stream_new noargs
-static int
-_wrap_g_memory_output_stream_new(PyGObject *self)
-{
-    self->obj = (GObject *)g_memory_output_stream_new(NULL, 0, g_realloc, g_free);
-
-    if (!self->obj) {
-        PyErr_SetString(PyExc_RuntimeError, "could not create gio.MemoryOutputStream object");
-        return -1;
-    }
-
-    pygobject_register_wrapper((PyObject *)self);
-    return 0;
-}
-%%
-override g_memory_output_stream_get_data noargs
-static PyObject *
-_wrap_g_memory_output_stream_get_data(PyGObject *self)
-{
-    GMemoryOutputStream *stream = G_MEMORY_OUTPUT_STREAM(self->obj);
-    return PyString_FromStringAndSize(g_memory_output_stream_get_data(stream),
-				      g_seekable_tell(G_SEEKABLE(stream)));
-}
-%%
 override g_output_stream_flush_async kwargs
 static PyObject *
 _wrap_g_output_stream_flush_async(PyGObject *self,



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