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.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/Mac/Modules/snd/sndsupport.py b/Mac/Modules/snd/sndsupport.py
index 9c100ac..91f3bb6 100644
--- a/Mac/Modules/snd/sndsupport.py
+++ b/Mac/Modules/snd/sndsupport.py
@@ -95,13 +95,14 @@ SMStatus = StructOutputBufferType('SMStatus')
CompressionInfo = StructOutputBufferType('CompressionInfo')
includestuff = includestuff + """
-
+#if !TARGET_API_MAC_CARBON
/* Create a SndCommand object (an (int, int, int) tuple) */
static PyObject *
SndCmd_New(SndCommand *pc)
{
return Py_BuildValue("hhl", pc->cmd, pc->param1, pc->param2);
}
+#endif
/* Convert a SndCommand argument */
static int
@@ -230,6 +231,9 @@ class SndObjectDefinition(ObjectDefinition):
def outputFreeIt(self, itselfname):
Output("SndDisposeChannel(%s, 1);", itselfname)
+ def outputConvert(self):
+ pass # Not needed
+
#
class SpbObjectDefinition(ObjectDefinition):
@@ -270,7 +274,7 @@ class SpbObjectDefinition(ObjectDefinition):
Output("Py_XDECREF(self->ob_interrupt);")
def outputConvert(self):
- Output("%s%s_Convert(PyObject *v, %s *p_itself)", self.static, self.prefix, self.itselftype)
+ Output("%sint %s_Convert(PyObject *v, %s *p_itself)", self.static, self.prefix, self.itselftype)
OutLbrace()
self.outputCheckConvertArg()
Output("if (!%s_Check(v))", self.prefix)
@@ -333,7 +337,7 @@ class SpbObjectDefinition(ObjectDefinition):
sndobject = SndObjectDefinition('SndChannel', 'SndCh', 'SndChannelPtr')
spbobject = SpbObjectDefinition('SPB', 'SPBObj', 'SPBPtr')
-spbgenerator = ManualGenerator("SPB", "return SPBObj_New();")
+spbgenerator = ManualGenerator("SPB", "_res = SPBObj_New(); return _res;")
module = MacModule('_Snd', 'Snd', includestuff, finalstuff, initstuff)
module.addobject(sndobject)
module.addobject(spbobject)