summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/snd/sndsupport.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Modules/snd/sndsupport.py')
-rw-r--r--Mac/Modules/snd/sndsupport.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Mac/Modules/snd/sndsupport.py b/Mac/Modules/snd/sndsupport.py
index 3516fa6..2181cd1 100644
--- a/Mac/Modules/snd/sndsupport.py
+++ b/Mac/Modules/snd/sndsupport.py
@@ -19,7 +19,7 @@ class SndMethod(SndMixIn, OSErrMethodGenerator): pass
includestuff = includestuff + """
#include <Sound.h>
-#ifndef __MWERKS__
+#ifndef HAVE_UNIVERSAL_HEADERS
#define SndCallBackUPP ProcPtr
#define NewSndCallBackProc(x) (x)
#define SndListHandle Handle
@@ -50,13 +50,13 @@ class SndCallBackType(InputOnlyType):
def __init__(self):
Type.__init__(self, 'PyObject*', 'O')
def getargsCheck(self, name):
- Output("if (%s != Py_None && !callable(%s))", name, name)
+ Output("if (%s != Py_None && !PyCallable_Check(%s))", name, name)
OutLbrace()
Output('PyErr_SetString(PyExc_TypeError, "callback must be callable");')
Output("goto %s__error__;", name)
OutRbrace()
def passInput(self, name):
- return "(SndCallBackProcPtr)&SndCh_UserRoutine"
+ return "NewSndCallBackProc(SndCh_UserRoutine)"
def cleanup(self, name):
# XXX This knows it is executing inside the SndNewChannel wrapper
Output("if (_res != NULL && %s != Py_None)", name)