summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/snd
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/snd
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/snd')
-rw-r--r--Mac/Modules/snd/_Sndmodule.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/Mac/Modules/snd/_Sndmodule.c b/Mac/Modules/snd/_Sndmodule.c
index fcaee5f..867c8f7 100644
--- a/Mac/Modules/snd/_Sndmodule.c
+++ b/Mac/Modules/snd/_Sndmodule.c
@@ -42,7 +42,7 @@ static PyObject *Snd_Error;
static PyTypeObject SndChannel_Type;
-#define SndCh_Check(x) ((x)->ob_type == &SndChannel_Type || PyObject_TypeCheck((x), &SndChannel_Type))
+#define SndCh_Check(x) (Py_Type(x) == &SndChannel_Type || PyObject_TypeCheck((x), &SndChannel_Type))
typedef struct SndChannelObject {
PyObject_HEAD
@@ -207,8 +207,7 @@ static PyMethodDef SndCh_methods[] = {
#define SndCh_hash NULL
static PyTypeObject SndChannel_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
+ PyVarObject_HEAD_INIT(NULL, 0)
"_Snd.SndChannel", /*tp_name*/
sizeof(SndChannelObject), /*tp_basicsize*/
0, /*tp_itemsize*/
@@ -257,7 +256,7 @@ static PyTypeObject SndChannel_Type = {
static PyTypeObject SPB_Type;
-#define SPBObj_Check(x) ((x)->ob_type == &SPB_Type || PyObject_TypeCheck((x), &SPB_Type))
+#define SPBObj_Check(x) (Py_Type(x) == &SPB_Type || PyObject_TypeCheck((x), &SPB_Type))
typedef struct SPBObject {
PyObject_HEAD
@@ -375,8 +374,7 @@ static PyGetSetDef SPBObj_getsetlist[] = {
#define SPBObj_hash NULL
static PyTypeObject SPB_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
+ PyVarObject_HEAD_INIT(NULL, 0)
"_Snd.SPB", /*tp_name*/
sizeof(SPBObject), /*tp_basicsize*/
0, /*tp_itemsize*/
@@ -1131,14 +1129,14 @@ void init_Snd(void)
if (Snd_Error == NULL ||
PyDict_SetItemString(d, "Error", Snd_Error) != 0)
return;
- SndChannel_Type.ob_type = &PyType_Type;
+ Py_Type(&SndChannel_Type) = &PyType_Type;
if (PyType_Ready(&SndChannel_Type) < 0) return;
Py_INCREF(&SndChannel_Type);
PyModule_AddObject(m, "SndChannel", (PyObject *)&SndChannel_Type);
/* Backward-compatible name */
Py_INCREF(&SndChannel_Type);
PyModule_AddObject(m, "SndChannelType", (PyObject *)&SndChannel_Type);
- SPB_Type.ob_type = &PyType_Type;
+ Py_Type(&SPB_Type) = &PyType_Type;
if (PyType_Ready(&SPB_Type) < 0) return;
Py_INCREF(&SPB_Type);
PyModule_AddObject(m, "SPB", (PyObject *)&SPB_Type);