[pygobject] fix subclassing PyLong by calling __new__ correctly



commit b5ee20afa4399c7689fbec8939fa20b927eeb782
Author: John (J5) Palmieri <johnp redhat com>
Date:   Thu Sep 9 08:04:40 2010 -0400

    fix subclassing PyLong by calling __new__ correctly
    
    https://bugzilla.gnome.org/show_bug.cgi?id=615872

 glib/pygspawn.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/pygspawn.c b/glib/pygspawn.c
index e924299..75e2232 100644
--- a/glib/pygspawn.c
+++ b/glib/pygspawn.c
@@ -67,8 +67,8 @@ pyg_pid_new(GPid pid)
     PYGLIB_PyLongObject *pygpid;
 
 #if PY_VERSION_HEX >= 0x03000000
-    return PyObject_CallMethod((PyObject*)&PyLong_Type, "__new__", "Oi", 
-		               &PyGPid_Type, pygpid);
+    return PyObject_CallMethod((PyObject*)&PyGPid_Type, "__new__", "Oi",
+		               &PyGPid_Type, pid);
 #else
     pygpid = PyObject_NEW(PyIntObject, &PyGPid_Type);
     pygpid->ob_ival = pid;



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