@@ -40,9 +40,6 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
4040extern PyObject * BMObj_New (BitMapPtr );
4141extern int BMObj_Convert (PyObject * , BitMapPtr * );
4242
43- extern PyObject * PMObj_New (PixMapHandle );
44- extern int PMObj_Convert (PyObject * , PixMapHandle * );
45-
4643extern PyObject * WinObj_WhichWindow (WindowPtr );
4744
4845#include <Sound.h>
@@ -78,23 +75,6 @@ SndCmd_Convert(PyObject *v, SndCommand *pc)
7875 return PyArg_Parse (v , "h" , & pc -> cmd );
7976}
8077
81- /* Create a NumVersion object (a quintuple of integers) */
82- static PyObject *
83- NumVer_New (NumVersion nv )
84- {
85- return Py_BuildValue ("iiiii" ,
86- nv .majorRev ,
87- #ifdef THINK_C
88- nv .minorRev ,
89- nv .bugFixRev ,
90- #else
91- (nv .minorAndBugRev >>4 ) & 0xf ,
92- nv .minorAndBugRev & 0xf ,
93- #endif
94- nv .stage ,
95- nv .nonRelRev );
96- }
97-
9878static pascal void SndCh_UserRoutine (SndChannelPtr chan , SndCommand * cmd ); /* Forward */
9979
10080static PyObject * Snd_Error ;
@@ -426,12 +406,12 @@ static PyObject *Snd_SndSoundManagerVersion(_self, _args)
426406 PyObject * _args ;
427407{
428408 PyObject * _res = NULL ;
429- long _rv ;
409+ NumVersion _rv ;
430410 if (!PyArg_ParseTuple (_args , "" ))
431411 return NULL ;
432412 _rv = SndSoundManagerVersion ();
433- _res = Py_BuildValue ("l " ,
434- _rv );
413+ _res = Py_BuildValue ("O& " ,
414+ PyMac_BuildNumVersion , _rv );
435415 return _res ;
436416}
437417
@@ -491,12 +471,12 @@ static PyObject *Snd_MACEVersion(_self, _args)
491471 PyObject * _args ;
492472{
493473 PyObject * _res = NULL ;
494- long _rv ;
474+ NumVersion _rv ;
495475 if (!PyArg_ParseTuple (_args , "" ))
496476 return NULL ;
497477 _rv = MACEVersion ();
498- _res = Py_BuildValue ("l " ,
499- _rv );
478+ _res = Py_BuildValue ("O& " ,
479+ PyMac_BuildNumVersion , _rv );
500480 return _res ;
501481}
502482
@@ -771,15 +751,15 @@ static PyMethodDef Snd_methods[] = {
771751 {"SndControl" , (PyCFunction )Snd_SndControl , 1 ,
772752 "(short id) -> (SndCommand cmd)" },
773753 {"SndSoundManagerVersion" , (PyCFunction )Snd_SndSoundManagerVersion , 1 ,
774- "() -> (long _rv)" },
754+ "() -> (NumVersion _rv)" },
775755 {"SndManagerStatus" , (PyCFunction )Snd_SndManagerStatus , 1 ,
776756 "(short theLength) -> (SMStatus theStatus)" },
777757 {"SndGetSysBeepState" , (PyCFunction )Snd_SndGetSysBeepState , 1 ,
778758 "() -> (short sysBeepState)" },
779759 {"SndSetSysBeepState" , (PyCFunction )Snd_SndSetSysBeepState , 1 ,
780760 "(short sysBeepState) -> None" },
781761 {"MACEVersion" , (PyCFunction )Snd_MACEVersion , 1 ,
782- "() -> (long _rv)" },
762+ "() -> (NumVersion _rv)" },
783763 {"Comp3to1" , (PyCFunction )Snd_Comp3to1 , 1 ,
784764 "(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)" },
785765 {"Exp1to3" , (PyCFunction )Snd_Exp1to3 , 1 ,
0 commit comments