[Python-checkins] python/dist/src/Mac/Modules/qt _Qtmodule.c, 1.23, 1.24 qtscan.py, 1.27, 1.28 qtsupport.py, 1.27, 1.28

jackjansen at users.sourceforge.net jackjansen at users.sourceforge.net
Sun Jan 11 17:52:14 EST 2004


Update of /cvsroot/python/python/dist/src/Mac/Modules/qt
In directory sc8-pr-cvs1:/tmp/cvs-serv28485

Modified Files:
	_Qtmodule.c qtscan.py qtsupport.py 
Log Message:
More cases of input parameters passed by reference without const.


Index: _Qtmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/qt/_Qtmodule.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** _Qtmodule.c	11 Jan 2004 22:27:42 -0000	1.23
--- _Qtmodule.c	11 Jan 2004 22:52:11 -0000	1.24
***************
*** 25836,25851 ****
  	ComponentResult _rv;
  	TunePlayer tp;
! 	unsigned long header;
  #ifndef TuneSetHeader
  	PyMac_PRECHECK(TuneSetHeader);
  #endif
! 	if (!PyArg_ParseTuple(_args, "O&",
! 	                      CmpInstObj_Convert, &tp))
  		return NULL;
  	_rv = TuneSetHeader(tp,
! 	                    &header);
! 	_res = Py_BuildValue("ll",
! 	                     _rv,
! 	                     header);
  	return _res;
  }
--- 25836,25851 ----
  	ComponentResult _rv;
  	TunePlayer tp;
! 	unsigned long * header;
  #ifndef TuneSetHeader
  	PyMac_PRECHECK(TuneSetHeader);
  #endif
! 	if (!PyArg_ParseTuple(_args, "O&s",
! 	                      CmpInstObj_Convert, &tp,
! 	                      &header))
  		return NULL;
  	_rv = TuneSetHeader(tp,
! 	                    header);
! 	_res = Py_BuildValue("l",
! 	                     _rv);
  	return _res;
  }
***************
*** 26150,26168 ****
  	ComponentResult _rv;
  	TunePlayer tp;
! 	unsigned long header;
  	unsigned long size;
  #ifndef TuneSetHeaderWithSize
  	PyMac_PRECHECK(TuneSetHeaderWithSize);
  #endif
! 	if (!PyArg_ParseTuple(_args, "O&l",
  	                      CmpInstObj_Convert, &tp,
  	                      &size))
  		return NULL;
  	_rv = TuneSetHeaderWithSize(tp,
! 	                            &header,
  	                            size);
! 	_res = Py_BuildValue("ll",
! 	                     _rv,
! 	                     header);
  	return _res;
  }
--- 26150,26168 ----
  	ComponentResult _rv;
  	TunePlayer tp;
! 	unsigned long * header;
  	unsigned long size;
  #ifndef TuneSetHeaderWithSize
  	PyMac_PRECHECK(TuneSetHeaderWithSize);
  #endif
! 	if (!PyArg_ParseTuple(_args, "O&sl",
  	                      CmpInstObj_Convert, &tp,
+ 	                      &header,
  	                      &size))
  		return NULL;
  	_rv = TuneSetHeaderWithSize(tp,
! 	                            header,
  	                            size);
! 	_res = Py_BuildValue("l",
! 	                     _rv);
  	return _res;
  }
***************
*** 27938,27942 ****
  	 PyDoc_STR("(NoteAllocator na) -> (ComponentResult _rv)")},
  	{"TuneSetHeader", (PyCFunction)Qt_TuneSetHeader, 1,
! 	 PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv, unsigned long header)")},
  	{"TuneGetTimeBase", (PyCFunction)Qt_TuneGetTimeBase, 1,
  	 PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv, TimeBase tb)")},
--- 27938,27942 ----
  	 PyDoc_STR("(NoteAllocator na) -> (ComponentResult _rv)")},
  	{"TuneSetHeader", (PyCFunction)Qt_TuneSetHeader, 1,
! 	 PyDoc_STR("(TunePlayer tp, unsigned long * header) -> (ComponentResult _rv)")},
  	{"TuneGetTimeBase", (PyCFunction)Qt_TuneGetTimeBase, 1,
  	 PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv, TimeBase tb)")},
***************
*** 27970,27974 ****
  	 PyDoc_STR("(TunePlayer tp, Handle data) -> (ComponentResult _rv)")},
  	{"TuneSetHeaderWithSize", (PyCFunction)Qt_TuneSetHeaderWithSize, 1,
! 	 PyDoc_STR("(TunePlayer tp, unsigned long size) -> (ComponentResult _rv, unsigned long header)")},
  	{"TuneSetPartMix", (PyCFunction)Qt_TuneSetPartMix, 1,
  	 PyDoc_STR("(TunePlayer tp, unsigned long partNumber, long volume, long balance, long mixFlags) -> (ComponentResult _rv)")},
--- 27970,27974 ----
  	 PyDoc_STR("(TunePlayer tp, Handle data) -> (ComponentResult _rv)")},
  	{"TuneSetHeaderWithSize", (PyCFunction)Qt_TuneSetHeaderWithSize, 1,
! 	 PyDoc_STR("(TunePlayer tp, unsigned long * header, unsigned long size) -> (ComponentResult _rv)")},
  	{"TuneSetPartMix", (PyCFunction)Qt_TuneSetPartMix, 1,
  	 PyDoc_STR("(TunePlayer tp, unsigned long partNumber, long volume, long balance, long mixFlags) -> (ComponentResult _rv)")},

Index: qtscan.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/qt/qtscan.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** qtscan.py	11 Jan 2004 22:27:42 -0000	1.27
--- qtscan.py	11 Jan 2004 22:52:12 -0000	1.28
***************
*** 307,310 ****
--- 307,313 ----
  			# for sending only. If that ever changes this needs to be fixed.
  			([('MusicMIDIPacket', '*', 'OutMode')], [('MusicMIDIPacket_ptr', '*', 'InMode')]),
+ 			
+ 			# QTMusic const-less input parameters
+ 			([('unsigned_long', 'header', 'OutMode')], [('UnsignedLongPtr', 'header', 'InMode')]),
  			]
  			

Index: qtsupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/qt/qtsupport.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** qtsupport.py	11 Jan 2004 22:27:42 -0000	1.27
--- qtsupport.py	11 Jan 2004 22:52:12 -0000	1.28
***************
*** 212,215 ****
--- 212,216 ----
  Ptr = InputOnlyType("Ptr", "s")
  StringPtr = Type("StringPtr", "s")
+ UnsignedLongPtr = Type("unsigned long *", "s")
  mcactionparams = InputOnlyType("void *", "s")
  QTParameterDialog = Type("QTParameterDialog", "l")





More information about the Python-checkins mailing list