[pygobject/py3k] Fix pyg_pid_new on python 3



commit dd811faac7fb2f44e5e324d248a689da6ccbd83d
Author: David Malcolm <dmalcolm redhat com>
Date:   Thu Apr 15 17:34:08 2010 -0400

    Fix pyg_pid_new on python 3

 glib/pygspawn.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/glib/pygspawn.c b/glib/pygspawn.c
index 7d3a12f..dcfade6 100644
--- a/glib/pygspawn.c
+++ b/glib/pygspawn.c
@@ -64,16 +64,16 @@ pyg_pid_tp_init(PyObject *self, PyObject *args, PyObject *kwargs)
 PyObject *
 pyg_pid_new(GPid pid)
 {
-    _PyLongObject *pygpid;
-
 #if PY_VERSION_HEX >= 0x03000000
     return PyObject_CallMethod((PyObject*)&PyLong_Type, "__new__", "Oi", 
-		               &PyGPid_Type, pygpid);
+		               &PyGPid_Type, pid);
 #else
+    _PyLongObject *pygpid;
+
     pygpid = PyObject_NEW(_PyLongObject, &PyGPid_Type);
     pygpid->ob_ival = pid;
-#endif    
     return (PyObject *) pygpid;
+#endif    
 }
 
 static void



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