mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Merged revisions 56483-56491 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk ........ r56486 | kurt.kaiser | 2007-07-22 05:27:08 +0200 (So, 22 Jul 2007) | 2 lines Fix typo introduced at r55797 ........ r56487 | kurt.kaiser | 2007-07-22 07:48:45 +0200 (So, 22 Jul 2007) | 2 lines Exception attr accessed via args in py3k. ........ r56489 | martin.v.loewis | 2007-07-22 15:32:44 +0200 (So, 22 Jul 2007) | 2 lines Regenerate. ........ r56490 | martin.v.loewis | 2007-07-22 15:34:06 +0200 (So, 22 Jul 2007) | 2 lines Port Mac modules to PEP 3123. ........ r56491 | martin.v.loewis | 2007-07-22 16:35:53 +0200 (So, 22 Jul 2007) | 1 line Port to PEP 3123. ........
This commit is contained in:
parent
5d7428b8ce
commit
95c95ce5be
28 changed files with 205 additions and 261 deletions
|
@ -128,8 +128,7 @@ sp_handle_as_int(sp_handle_object* self)
|
|||
static PyNumberMethods sp_handle_as_number;
|
||||
|
||||
static PyTypeObject sp_handle_type = {
|
||||
PyObject_HEAD_INIT(NULL)
|
||||
0, /*ob_size*/
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"_subprocess_handle", sizeof(sp_handle_object), 0,
|
||||
(destructor) sp_handle_dealloc, /*tp_dealloc*/
|
||||
0, /*tp_print*/
|
||||
|
@ -273,7 +272,7 @@ gethandle(PyObject* obj, char* name)
|
|||
PyErr_Clear(); /* FIXME: propagate error? */
|
||||
return NULL;
|
||||
}
|
||||
if (value->ob_type != &sp_handle_type)
|
||||
if (Py_Type(&value) != &sp_handle_type)
|
||||
ret = NULL;
|
||||
else
|
||||
ret = value->handle;
|
||||
|
@ -556,7 +555,7 @@ init_subprocess()
|
|||
PyObject *m;
|
||||
|
||||
/* patch up object descriptors */
|
||||
sp_handle_type.ob_type = &PyType_Type;
|
||||
Py_Type(&sp_handle_type) = &PyType_Type;
|
||||
sp_handle_as_number.nb_int = (unaryfunc) sp_handle_as_int;
|
||||
|
||||
m = Py_InitModule("_subprocess", sp_functions);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue