Author: martin.v.loewis
Date: Sun Jul 22 16:35:53 2007
New Revision: 56491
Modified:
python/branches/p3yk/PC/_subprocess.c
python/branches/p3yk/PC/_winreg.c
Log:
Port to PEP 3123.
Modified: python/branches/p3yk/PC/_subprocess.c
==============================================================================
--- python/branches/p3yk/PC/_subprocess.c (original)
+++ python/branches/p3yk/PC/_subprocess.c Sun Jul 22 16:35:53 2007
@@ -128,8 +128,7 @@
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 @@
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 @@
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);
Modified: python/branches/p3yk/PC/_winreg.c
==============================================================================
--- python/branches/p3yk/PC/_winreg.c (original)
+++ python/branches/p3yk/PC/_winreg.c Sun Jul 22 16:35:53 2007
@@ -1453,7 +1453,7 @@
if (m == NULL)
return;
d = PyModule_GetDict(m);
- PyHKEY_Type.ob_type = &PyType_Type;
+ Py_Type(&PyHKEY_Type) = &PyType_Type;
PyHKEY_Type.tp_doc = PyHKEY_doc;
Py_INCREF(&PyHKEY_Type);
if (PyDict_SetItemString(d, "HKEYType",
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins