summaryrefslogtreecommitdiffstats
path: root/glib
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2010-04-15 17:34:08 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2010-04-16 13:02:23 -0400
commit8c0e1634ff4546a94101cd3965e94c81d04649c2 (patch)
tree90481d05bfa6e375eace7c09f2bf8f49bdd8e478 /glib
parent882652743e7b15bcf756e1e6bc9456a84942630d (diff)
downloadpygobject-8c0e1634ff4546a94101cd3965e94c81d04649c2.tar.gz
pygobject-8c0e1634ff4546a94101cd3965e94c81d04649c2.tar.xz
pygobject-8c0e1634ff4546a94101cd3965e94c81d04649c2.zip
Fix pyg_pid_new on python 3
Diffstat (limited to 'glib')
-rw-r--r--glib/pygspawn.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/glib/pygspawn.c b/glib/pygspawn.c
index 3471b4a..f816f99 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