[pygobject] Create GLib.Pid in the same way on python 2 and 3



commit aba45eb2617c4b35168089bc9028f351732a617f
Author: Benjamin Berg <benjamin sipsolutions net>
Date:   Tue Aug 6 00:41:52 2013 +0200

    Create GLib.Pid in the same way on python 2 and 3
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705451

 gi/_glib/pygspawn.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)
---
diff --git a/gi/_glib/pygspawn.c b/gi/_glib/pygspawn.c
index 2cda307..72746b8 100644
--- a/gi/_glib/pygspawn.c
+++ b/gi/_glib/pygspawn.c
@@ -66,16 +66,8 @@ pyg_pid_tp_init(PyObject *self, PyObject *args, PyObject *kwargs)
 PyObject *
 pyg_pid_new(GPid pid)
 {
-    PYGLIB_PyLongObject *pygpid;
-
-#if PY_VERSION_HEX >= 0x03000000
     return PyObject_CallMethod((PyObject*)&PyGPid_Type, "__new__", "Oi",
                               &PyGPid_Type, pid);
-#else
-    pygpid = PyObject_NEW(PyIntObject, &PyGPid_Type);
-    pygpid->ob_ival = pid;
-#endif
-    return (PyObject *) pygpid;
 }
 
 static void


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