diff options
Diffstat (limited to 'gi/_glib')
-rw-r--r-- | gi/_glib/Makefile.in | 2 | ||||
-rw-r--r-- | gi/_glib/pygspawn.c | 9 |
2 files changed, 2 insertions, 9 deletions
diff --git a/gi/_glib/Makefile.in b/gi/_glib/Makefile.in index 3b285e9..b08e8f1 100644 --- a/gi/_glib/Makefile.in +++ b/gi/_glib/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.2 from Makefile.am. +# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. diff --git a/gi/_glib/pygspawn.c b/gi/_glib/pygspawn.c index 07adbff..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 @@ -262,5 +254,6 @@ pyglib_spawn_register_types(PyObject *d) PyGPid_Type.tp_methods = pyg_pid_methods; PyGPid_Type.tp_init = pyg_pid_tp_init; PyGPid_Type.tp_free = (freefunc)pyg_pid_free; + PyGPid_Type.tp_new = PYGLIB_PyLong_Type.tp_new; PYGLIB_REGISTER_TYPE(d, PyGPid_Type, "Pid"); } |