summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/mlte/_Mltemodule.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2007-07-22 14:41:55 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2007-07-22 14:41:55 (GMT)
commit95c95ce5be8cf87e0e95ef285664aabda7ddd170 (patch)
tree154ee47a643efbe4c628b196e2e2dce88f61ecf6 /Mac/Modules/mlte/_Mltemodule.c
parent5d7428b8ce0ffc79b24b05df2b3d2865db037902 (diff)
downloadcpython-95c95ce5be8cf87e0e95ef285664aabda7ddd170.zip
cpython-95c95ce5be8cf87e0e95ef285664aabda7ddd170.tar.gz
cpython-95c95ce5be8cf87e0e95ef285664aabda7ddd170.tar.bz2
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. ........
Diffstat (limited to 'Mac/Modules/mlte/_Mltemodule.c')
-rw-r--r--Mac/Modules/mlte/_Mltemodule.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/Mac/Modules/mlte/_Mltemodule.c b/Mac/Modules/mlte/_Mltemodule.c
index a79b257..748139e 100644
--- a/Mac/Modules/mlte/_Mltemodule.c
+++ b/Mac/Modules/mlte/_Mltemodule.c
@@ -69,7 +69,7 @@ static PyObject *Mlte_Error;
PyTypeObject TXNObject_Type;
-#define TXNObj_Check(x) ((x)->ob_type == &TXNObject_Type || PyObject_TypeCheck((x), &TXNObject_Type))
+#define TXNObj_Check(x) (Py_Type(x) == &TXNObject_Type || PyObject_TypeCheck((x), &TXNObject_Type))
typedef struct TXNObjectObject {
PyObject_HEAD
@@ -100,7 +100,7 @@ int TXNObj_Convert(PyObject *v, TXNObject *p_itself)
static void TXNObj_dealloc(TXNObjectObject *self)
{
/* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ Py_Type(self)->tp_free((PyObject *)self);
}
static PyObject *TXNObj_TXNDeleteObject(TXNObjectObject *_self, PyObject *_args)
@@ -1255,8 +1255,7 @@ static PyObject *TXNObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_k
PyTypeObject TXNObject_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
+ PyVarObject_HEAD_INIT(NULL, 0)
"_Mlte.TXNObject", /*tp_name*/
sizeof(TXNObjectObject), /*tp_basicsize*/
0, /*tp_itemsize*/
@@ -1305,7 +1304,7 @@ PyTypeObject TXNObject_Type = {
PyTypeObject TXNFontMenuObject_Type;
-#define TXNFontMenuObj_Check(x) ((x)->ob_type == &TXNFontMenuObject_Type || PyObject_TypeCheck((x), &TXNFontMenuObject_Type))
+#define TXNFontMenuObj_Check(x) (Py_Type(x) == &TXNFontMenuObject_Type || PyObject_TypeCheck((x), &TXNFontMenuObject_Type))
typedef struct TXNFontMenuObjectObject {
PyObject_HEAD
@@ -1336,7 +1335,7 @@ int TXNFontMenuObj_Convert(PyObject *v, TXNFontMenuObject *p_itself)
static void TXNFontMenuObj_dealloc(TXNFontMenuObjectObject *self)
{
/* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ Py_Type(self)->tp_free((PyObject *)self);
}
static PyObject *TXNFontMenuObj_TXNGetFontMenuHandle(TXNFontMenuObjectObject *_self, PyObject *_args)
@@ -1409,8 +1408,7 @@ static PyObject *TXNFontMenuObj_tp_new(PyTypeObject *type, PyObject *_args, PyOb
PyTypeObject TXNFontMenuObject_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
+ PyVarObject_HEAD_INIT(NULL, 0)
"_Mlte.TXNFontMenuObject", /*tp_name*/
sizeof(TXNFontMenuObjectObject), /*tp_basicsize*/
0, /*tp_itemsize*/
@@ -1661,14 +1659,14 @@ void init_Mlte(void)
if (Mlte_Error == NULL ||
PyDict_SetItemString(d, "Error", Mlte_Error) != 0)
return;
- TXNObject_Type.ob_type = &PyType_Type;
+ Py_Type(&TXNObject_Type) = &PyType_Type;
if (PyType_Ready(&TXNObject_Type) < 0) return;
Py_INCREF(&TXNObject_Type);
PyModule_AddObject(m, "TXNObject", (PyObject *)&TXNObject_Type);
/* Backward-compatible name */
Py_INCREF(&TXNObject_Type);
PyModule_AddObject(m, "TXNObjectType", (PyObject *)&TXNObject_Type);
- TXNFontMenuObject_Type.ob_type = &PyType_Type;
+ Py_Type(&TXNFontMenuObject_Type) = &PyType_Type;
if (PyType_Ready(&TXNFontMenuObject_Type) < 0) return;
Py_INCREF(&TXNFontMenuObject_Type);
PyModule_AddObject(m, "TXNFontMenuObject", (PyObject *)&TXNFontMenuObject_Type);