[Python-checkins] CVS: python/dist/src/Mac/Modules/snd sndsupport.py,1.14,1.15

Jack Jansen jackjansen@users.sourceforge.net
2001年5月22日 14:55:42 -0700


Update of /cvsroot/python/python/dist/src/Mac/Modules/snd
In directory usw-pr-cvs1:/tmp/cvs-serv15120/Python/Mac/Modules/snd
Modified Files:
	sndsupport.py 
Log Message:
Lots more Carbon/Carbon.h includes, new UPP routine names, function prototypes. Most toolbox modules now compile, link and import in MacOSX-MachO python.
Index: sndsupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/snd/sndsupport.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** sndsupport.py	2001年01月12日 23:39:59	1.14
--- sndsupport.py	2001年05月22日 21:55:39	1.15
***************
*** 18,22 ****
--- 18,27 ----
 
 includestuff = includestuff + """
+ #ifdef WITHOUT_FRAMEWORKS
 #include <Sound.h>
+ #include <OSUtils.h> /* for Set(Current)A5 */
+ #else
+ #include <Carbon/Carbon.h>
+ #endif
 """
 
***************
*** 58,62 ****
 		OutRbrace()
 	def passInput(self, name):
! 		return "NewSndCallBackProc(SndCh_UserRoutine)"
 	def cleanup(self, name):
 		# XXX This knows it is executing inside the SndNewChannel wrapper
--- 63,67 ----
 		OutRbrace()
 	def passInput(self, name):
! 		return "NewSndCallBackUPP(SndCh_UserRoutine)"
 	def cleanup(self, name):
 		# XXX This knows it is executing inside the SndNewChannel wrapper
***************
*** 91,95 ****
 
 includestuff = includestuff + """
- #include <OSUtils.h> /* for Set(Current)A5 */
 
 /* Create a SndCommand object (an (int, int, int) tuple) */
--- 96,99 ----
***************
*** 127,132 ****
 /* Routine passed to Py_AddPendingCall -- call the Python callback */
 static int
! SndCh_CallCallBack(arg)
! 	void *arg;
 {
 	SndChannelObject *p = (SndChannelObject *)arg;
--- 131,135 ----
 /* Routine passed to Py_AddPendingCall -- call the Python callback */
 static int
! SndCh_CallCallBack(void *arg)
 {
 	SndChannelObject *p = (SndChannelObject *)arg;
***************
*** 158,163 ****
 /* SPB callbacks - Schedule callbacks to Python */
 static int
! SPB_CallCallBack(arg)
! 	void *arg;
 {
 	SPBObject *p = (SPBObject *)arg;
--- 161,165 ----
 /* SPB callbacks - Schedule callbacks to Python */
 static int
! SPB_CallCallBack(void *arg)
 {
 	SPBObject *p = (SPBObject *)arg;
***************
*** 269,277 ****
 	
 	def outputConvert(self):
! 		Output("%s%s_Convert(v, p_itself)", self.static, self.prefix)
! 		IndentLevel()
! 		Output("PyObject *v;")
! 		Output("%s *p_itself;", self.itselftype)
! 		DedentLevel()
 		OutLbrace()
 		self.outputCheckConvertArg()
--- 271,275 ----
 	
 	def outputConvert(self):
! 		Output("%s%s_Convert(PyObject *v, %s *p_itself)", self.static, self.prefix, self.itselftype)
 		OutLbrace()
 		self.outputCheckConvertArg()
***************
*** 287,296 ****
 	def outputSetattr(self):
 		Output()
! 		Output("static int %s_setattr(self, name, value)", self.prefix)
! 		IndentLevel()
! 		Output("%s *self;", self.objecttype)
! 		Output("char *name;")
! 		Output("PyObject *value;")
! 		DedentLevel()
 		OutLbrace()
 		self.outputSetattrBody()
--- 285,290 ----
 	def outputSetattr(self):
 		Output()
! 		Output("static int %s_setattr(%s *self, char *name, PyObject *value)", 
! 			self.prefix, self.objecttype)
 		OutLbrace()
 		self.outputSetattrBody()
***************
*** 310,314 ****
 		rv = PyArg_Parse(value, "w#", &self->ob_spb.bufferPtr, &self->ob_spb.bufferLength);
 	else if (strcmp(name, "completionRoutine") == 0) {
! 		self->ob_spb.completionRoutine = NewSICompletionProc(SPB_completion);
 		self->ob_completion = value;
 		Py_INCREF(value);
--- 304,308 ----
 		rv = PyArg_Parse(value, "w#", &self->ob_spb.bufferPtr, &self->ob_spb.bufferLength);
 	else if (strcmp(name, "completionRoutine") == 0) {
! 		self->ob_spb.completionRoutine = NewSICompletionUPP(SPB_completion);
 		self->ob_completion = value;
 		Py_INCREF(value);
***************
*** 316,320 ****
 #if !TARGET_API_MAC_CARBON
 	} else if (strcmp(name, "interruptRoutine") == 0) {
! 		self->ob_spb.completionRoutine = NewSIInterruptProc(SPB_interrupt);
 		self->ob_interrupt = value;
 		Py_INCREF(value);
--- 310,314 ----
 #if !TARGET_API_MAC_CARBON
 	} else if (strcmp(name, "interruptRoutine") == 0) {
! 		self->ob_spb.completionRoutine = NewSIInterruptUPP(SPB_interrupt);
 		self->ob_interrupt = value;
 		Py_INCREF(value);

AltStyle によって変換されたページ (->オリジナル) /