[pygobject/gsoc2009: 132/160] Change pygobject_new_from_type declaration



commit d80700bde4a5a1008319d15c81a27fcdcecd6552
Author: Simon van der Linden <svdlinden src gnome org>
Date:   Tue Aug 11 22:46:23 2009 +0200

    Change pygobject_new_from_type declaration

 gi/pygi-info.c              |    2 +-
 gobject/pygobject-private.h |    2 +-
 gobject/pygobject.c         |    6 +++---
 gobject/pygobject.h         |    6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gi/pygi-info.c b/gi/pygi-info.c
index a165376..24f705d 100644
--- a/gi/pygi-info.c
+++ b/gi/pygi-info.c
@@ -782,7 +782,7 @@ _wrap_g_function_info_invoke (PyGIBaseInfo *self,
         g_assert(n_py_args > 0);
         type = (PyTypeObject *)PyTuple_GET_ITEM(py_args, 0);
 
-        return_value = pygobject_new_from_type(return_arg.v_pointer, TRUE, type);
+        return_value = pygobject_new_from_type(type, return_arg.v_pointer, TRUE);
     } else {
         GITransfer transfer;
 
diff --git a/gobject/pygobject-private.h b/gobject/pygobject-private.h
index b4ac72e..18ab07d 100644
--- a/gobject/pygobject-private.h
+++ b/gobject/pygobject-private.h
@@ -149,7 +149,7 @@ void          pygobject_register_class   (PyObject *dict,
 void          pygobject_register_wrapper (PyObject *self);
 PyObject *    pygobject_new              (GObject *obj);
 PyObject *    pygobject_new_full         (GObject *obj, gboolean sink, gpointer g_class);
-PyObject *    pygobject_new_from_type    (GObject *obj, gboolean sink, PyTypeObject *type);
+PyObject *    pygobject_new_from_type    (PyTypeObject *type, GObject *obj, gboolean sink);
 void          pygobject_sink             (GObject *obj);
 PyTypeObject *pygobject_lookup_class     (GType gtype);
 void          pygobject_watch_closure    (PyObject *self, GClosure *closure);
diff --git a/gobject/pygobject.c b/gobject/pygobject.c
index 0786adc..c28f476 100644
--- a/gobject/pygobject.c
+++ b/gobject/pygobject.c
@@ -885,9 +885,9 @@ pygobject_lookup_class(GType gtype)
 
 /**
  * pygobject_new_from_type:
+ * @type: a non-strict subtype of PyGObject_Type.
  * @obj: a GObject instance.
  * @sink: whether to sink any floating reference found on the GObject.
- * @type: a non-strict subtype of PyGObject_Type.
  *
  * This function creates a wrapper instance from the given Python type for the
  * GObject instance. In case of error, it returns NULL and sets an exception.
@@ -895,7 +895,7 @@ pygobject_lookup_class(GType gtype)
  * Returns: a new reference to the wrapper instance for the object.
  */
 PyObject *
-pygobject_new_from_type(GObject *obj, gboolean sink, PyTypeObject *type)
+pygobject_new_from_type(PyTypeObject *type, GObject *obj, gboolean sink)
 {
 	PyGObject *self;
 
@@ -986,7 +986,7 @@ pygobject_new_full(GObject *obj, gboolean sink, gpointer g_class)
         }
         g_assert(tp != NULL);
 
-		self = (PyGObject *)pygobject_new_from_type(obj, sink, tp);
+		self = (PyGObject *)pygobject_new_from_type(tp, obj, sink);
     }
 
     return (PyObject *)self;
diff --git a/gobject/pygobject.h b/gobject/pygobject.h
index 8f91536..2db7cd7 100644
--- a/gobject/pygobject.h
+++ b/gobject/pygobject.h
@@ -202,9 +202,9 @@ struct _PyGObject_Functions {
     PyTypeObject *object_type;
     PyTypeObject *type_wrapper_type;
 
-	PyObject *(*object_new_from_type) (GObject *obj,
-									   gboolean sink,
-									   PyTypeObject *type);
+    PyObject *(*object_new_from_type) (PyTypeObject *type,
+                                       GObject *obj,
+                                       gboolean sink);
 };
 
 #ifndef _INSIDE_PYGOBJECT_



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