[Python-checkins] python/dist/src/Mac/Modules/snd _Sndmodule.c,1.11,1.12
jackjansen@users.sourceforge.net
jackjansen@users.sourceforge.net
Tue, 03 Dec 2002 15:40:24 -0800
Update of /cvsroot/python/python/dist/src/Mac/Modules/snd
In directory sc8-pr-cvs1:/tmp/cvs-serv10318/snd
Modified Files:
_Sndmodule.c
Log Message:
Added PEP253 support to most Carbon modules. This isn't complete yet:
some of the more compilcated cases (CF, Res) haven't been done yet. Also,
various types should inherit from each other (anything with an as_Resource
method should be a Resource subtype, the CF types should become one family).
Index: _Sndmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/snd/_Sndmodule.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** _Sndmodule.c 29 Nov 2002 23:40:47 -0000 1.11
--- _Sndmodule.c 3 Dec 2002 23:40:21 -0000 1.12
***************
*** 331,347 ****
PyObject_GenericGetAttr, /*tp_getattro*/
PyObject_GenericSetAttr, /*tp_setattro */
! 0, /*outputHook_tp_as_buffer*/
! 0, /*outputHook_tp_flags*/
! 0, /*outputHook_tp_doc*/
! 0, /*outputHook_tp_traverse*/
! 0, /*outputHook_tp_clear*/
! 0, /*outputHook_tp_richcompare*/
! 0, /*outputHook_tp_weaklistoffset*/
! 0, /*outputHook_tp_iter*/
! 0, /*outputHook_tp_iternext*/
SndCh_methods, /* tp_methods */
! 0, /*outputHook_tp_members*/
SndCh_getsetlist, /*tp_getset*/
! 0, /*outputHook_tp_base*/
};
--- 331,355 ----
PyObject_GenericGetAttr, /*tp_getattro*/
PyObject_GenericSetAttr, /*tp_setattro */
! 0, /*tp_as_buffer*/
! Py_TPFLAGS_DEFAULT, /* tp_flags */
! 0, /*tp_doc*/
! 0, /*tp_traverse*/
! 0, /*tp_clear*/
! 0, /*tp_richcompare*/
! 0, /*tp_weaklistoffset*/
! 0, /*tp_iter*/
! 0, /*tp_iternext*/
SndCh_methods, /* tp_methods */
! 0, /*tp_members*/
SndCh_getsetlist, /*tp_getset*/
! 0, /*tp_base*/
! 0, /*tp_dict*/
! 0, /*tp_descr_get*/
! 0, /*tp_descr_set*/
! 0, /*tp_dictoffset*/
! 0, /*tp_init*/
! 0, /*tp_alloc*/
! 0, /*tp_new*/
! 0, /*tp_free*/
};
***************
*** 460,463 ****
--- 468,472 ----
{"error", (getter)SPBObj_get_error, (setter)SPBObj_set_error, NULL},
{"completionRoutine", (getter)SPBObj_get_completionRoutine, (setter)SPBObj_set_completionRoutine, NULL},
+ {NULL, NULL, NULL, NULL},
};
***************
*** 490,506 ****
PyObject_GenericGetAttr, /*tp_getattro*/
PyObject_GenericSetAttr, /*tp_setattro */
! 0, /*outputHook_tp_as_buffer*/
! 0, /*outputHook_tp_flags*/
! 0, /*outputHook_tp_doc*/
! 0, /*outputHook_tp_traverse*/
! 0, /*outputHook_tp_clear*/
! 0, /*outputHook_tp_richcompare*/
! 0, /*outputHook_tp_weaklistoffset*/
! 0, /*outputHook_tp_iter*/
! 0, /*outputHook_tp_iternext*/
SPBObj_methods, /* tp_methods */
! 0, /*outputHook_tp_members*/
SPBObj_getsetlist, /*tp_getset*/
! 0, /*outputHook_tp_base*/
};
--- 499,523 ----
PyObject_GenericGetAttr, /*tp_getattro*/
PyObject_GenericSetAttr, /*tp_setattro */
! 0, /*tp_as_buffer*/
! Py_TPFLAGS_DEFAULT, /* tp_flags */
! 0, /*tp_doc*/
! 0, /*tp_traverse*/
! 0, /*tp_clear*/
! 0, /*tp_richcompare*/
! 0, /*tp_weaklistoffset*/
! 0, /*tp_iter*/
! 0, /*tp_iternext*/
SPBObj_methods, /* tp_methods */
! 0, /*tp_members*/
SPBObj_getsetlist, /*tp_getset*/
! 0, /*tp_base*/
! 0, /*tp_dict*/
! 0, /*tp_descr_get*/
! 0, /*tp_descr_set*/
! 0, /*tp_dictoffset*/
! 0, /*tp_init*/
! 0, /*tp_alloc*/
! 0, /*tp_new*/
! 0, /*tp_free*/
};
***************
*** 1538,1547 ****
SndChannel_Type.ob_type = &PyType_Type;
Py_INCREF(&SndChannel_Type);
! if (PyDict_SetItemString(d, "SndChannelType", (PyObject *)&SndChannel_Type) != 0)
! Py_FatalError("can't initialize SndChannelType");
SPB_Type.ob_type = &PyType_Type;
Py_INCREF(&SPB_Type);
! if (PyDict_SetItemString(d, "SPBType", (PyObject *)&SPB_Type) != 0)
! Py_FatalError("can't initialize SPBType");
}
--- 1555,1568 ----
SndChannel_Type.ob_type = &PyType_Type;
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_INCREF(&SPB_Type);
! PyModule_AddObject(m, "SPB", (PyObject *)&SPB_Type);
! /* Backward-compatible name */
! Py_INCREF(&SPB_Type);
! PyModule_AddObject(m, "SPBType", (PyObject *)&SPB_Type);
}