mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
Shut up many more gcc warnings.
This commit is contained in:
parent
5a1516bce5
commit
fd064863eb
31 changed files with 186 additions and 110 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue