Commit 5674e4ec authored by Jack Jansen's avatar Jack Jansen

NumVersion stuff has changed

parent d1f06313
...@@ -40,9 +40,6 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *); ...@@ -40,9 +40,6 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern PyObject *BMObj_New(BitMapPtr); extern PyObject *BMObj_New(BitMapPtr);
extern int BMObj_Convert(PyObject *, BitMapPtr *); extern int BMObj_Convert(PyObject *, BitMapPtr *);
extern PyObject *PMObj_New(PixMapHandle);
extern int PMObj_Convert(PyObject *, PixMapHandle *);
extern PyObject *WinObj_WhichWindow(WindowPtr); extern PyObject *WinObj_WhichWindow(WindowPtr);
#include <Sound.h> #include <Sound.h>
...@@ -78,23 +75,6 @@ SndCmd_Convert(PyObject *v, SndCommand *pc) ...@@ -78,23 +75,6 @@ SndCmd_Convert(PyObject *v, SndCommand *pc)
return PyArg_Parse(v, "h", &pc->cmd); return PyArg_Parse(v, "h", &pc->cmd);
} }
/* Create a NumVersion object (a quintuple of integers) */
static PyObject *
NumVer_New(NumVersion nv)
{
return Py_BuildValue("iiiii",
nv.majorRev,
#ifdef THINK_C
nv.minorRev,
nv.bugFixRev,
#else
(nv.minorAndBugRev>>4) & 0xf,
nv.minorAndBugRev & 0xf,
#endif
nv.stage,
nv.nonRelRev);
}
static pascal void SndCh_UserRoutine(SndChannelPtr chan, SndCommand *cmd); /* Forward */ static pascal void SndCh_UserRoutine(SndChannelPtr chan, SndCommand *cmd); /* Forward */
static PyObject *Snd_Error; static PyObject *Snd_Error;
...@@ -426,12 +406,12 @@ static PyObject *Snd_SndSoundManagerVersion(_self, _args) ...@@ -426,12 +406,12 @@ static PyObject *Snd_SndSoundManagerVersion(_self, _args)
PyObject *_args; PyObject *_args;
{ {
PyObject *_res = NULL; PyObject *_res = NULL;
long _rv; NumVersion _rv;
if (!PyArg_ParseTuple(_args, "")) if (!PyArg_ParseTuple(_args, ""))
return NULL; return NULL;
_rv = SndSoundManagerVersion(); _rv = SndSoundManagerVersion();
_res = Py_BuildValue("l", _res = Py_BuildValue("O&",
_rv); PyMac_BuildNumVersion, _rv);
return _res; return _res;
} }
...@@ -491,12 +471,12 @@ static PyObject *Snd_MACEVersion(_self, _args) ...@@ -491,12 +471,12 @@ static PyObject *Snd_MACEVersion(_self, _args)
PyObject *_args; PyObject *_args;
{ {
PyObject *_res = NULL; PyObject *_res = NULL;
long _rv; NumVersion _rv;
if (!PyArg_ParseTuple(_args, "")) if (!PyArg_ParseTuple(_args, ""))
return NULL; return NULL;
_rv = MACEVersion(); _rv = MACEVersion();
_res = Py_BuildValue("l", _res = Py_BuildValue("O&",
_rv); PyMac_BuildNumVersion, _rv);
return _res; return _res;
} }
...@@ -771,7 +751,7 @@ static PyMethodDef Snd_methods[] = { ...@@ -771,7 +751,7 @@ static PyMethodDef Snd_methods[] = {
{"SndControl", (PyCFunction)Snd_SndControl, 1, {"SndControl", (PyCFunction)Snd_SndControl, 1,
"(short id) -> (SndCommand cmd)"}, "(short id) -> (SndCommand cmd)"},
{"SndSoundManagerVersion", (PyCFunction)Snd_SndSoundManagerVersion, 1, {"SndSoundManagerVersion", (PyCFunction)Snd_SndSoundManagerVersion, 1,
"() -> (long _rv)"}, "() -> (NumVersion _rv)"},
{"SndManagerStatus", (PyCFunction)Snd_SndManagerStatus, 1, {"SndManagerStatus", (PyCFunction)Snd_SndManagerStatus, 1,
"(short theLength) -> (SMStatus theStatus)"}, "(short theLength) -> (SMStatus theStatus)"},
{"SndGetSysBeepState", (PyCFunction)Snd_SndGetSysBeepState, 1, {"SndGetSysBeepState", (PyCFunction)Snd_SndGetSysBeepState, 1,
...@@ -779,7 +759,7 @@ static PyMethodDef Snd_methods[] = { ...@@ -779,7 +759,7 @@ static PyMethodDef Snd_methods[] = {
{"SndSetSysBeepState", (PyCFunction)Snd_SndSetSysBeepState, 1, {"SndSetSysBeepState", (PyCFunction)Snd_SndSetSysBeepState, 1,
"(short sysBeepState) -> None"}, "(short sysBeepState) -> None"},
{"MACEVersion", (PyCFunction)Snd_MACEVersion, 1, {"MACEVersion", (PyCFunction)Snd_MACEVersion, 1,
"() -> (long _rv)"}, "() -> (NumVersion _rv)"},
{"Comp3to1", (PyCFunction)Snd_Comp3to1, 1, {"Comp3to1", (PyCFunction)Snd_Comp3to1, 1,
"(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)"}, "(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)"},
{"Exp1to3", (PyCFunction)Snd_Exp1to3, 1, {"Exp1to3", (PyCFunction)Snd_Exp1to3, 1,
......
...@@ -79,8 +79,6 @@ SndCallBackUPP = SndCallBackProcPtr ...@@ -79,8 +79,6 @@ SndCallBackUPP = SndCallBackProcPtr
SndCompletionProcPtr = FakeType('(SndCompletionProcPtr)0') # XXX SndCompletionProcPtr = FakeType('(SndCompletionProcPtr)0') # XXX
SndCompletionUPP = SndCompletionProcPtr SndCompletionUPP = SndCompletionProcPtr
NumVersion = OpaqueByValueType('NumVersion', 'NumVer')
##InOutBuf128 = FixedInputOutputBufferType(128) ##InOutBuf128 = FixedInputOutputBufferType(128)
StateBlock = StructInputOutputBufferType('StateBlock') StateBlock = StructInputOutputBufferType('StateBlock')
...@@ -119,23 +117,6 @@ SndCmd_Convert(PyObject *v, SndCommand *pc) ...@@ -119,23 +117,6 @@ SndCmd_Convert(PyObject *v, SndCommand *pc)
return PyArg_Parse(v, "h", &pc->cmd); return PyArg_Parse(v, "h", &pc->cmd);
} }
/* Create a NumVersion object (a quintuple of integers) */
static PyObject *
NumVer_New(NumVersion nv)
{
return Py_BuildValue("iiiii",
nv.majorRev,
#ifdef THINK_C
nv.minorRev,
nv.bugFixRev,
#else
(nv.minorAndBugRev>>4) & 0xf,
nv.minorAndBugRev & 0xf,
#endif
nv.stage,
nv.nonRelRev);
}
static pascal void SndCh_UserRoutine(SndChannelPtr chan, SndCommand *cmd); /* Forward */ static pascal void SndCh_UserRoutine(SndChannelPtr chan, SndCommand *cmd); /* Forward */
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment