Shut up many more gcc warnings.

This commit is contained in:
Jack Jansen 2001-09-05 10:31:52 +00:00
parent 5a1516bce5
commit fd064863eb
31 changed files with 186 additions and 110 deletions

View file

@ -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)