[Python-checkins] python/dist/src/Mac/Modules/help _Helpmodule.c,1.8,1.8.6.1

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Fri, 18 Apr 2003 01:59:16 -0700


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

Modified Files:
      Tag: getargs_mask_mods
	_Helpmodule.c 
Log Message:
Fixes for the new PyArg_ParseTuple k and K format chars, and the
changed semantics of h. Only lightly tested, but the IDE works
again.

These changes may not be needed anymore now that the semantic change
to h has been reverted, so I'm checking it in on a branch.


Index: _Helpmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/help/_Helpmodule.c,v
retrieving revision 1.8
retrieving revision 1.8.6.1
diff -C2 -d -r1.8 -r1.8.6.1
*** _Helpmodule.c	18 Nov 2002 15:26:38 -0000	1.8
--- _Helpmodule.c	18 Apr 2003 08:58:43 -0000	1.8.6.1
***************
*** 15,21 ****
  /* Macro to test whether a weak-loaded CFM function exists */
  #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
!     	PyErr_SetString(PyExc_NotImplementedError, \
!     	"Not available in this shared library/OS version"); \
!     	return NULL; \
      }} while(0)
  
--- 15,21 ----
  /* Macro to test whether a weak-loaded CFM function exists */
  #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
!         PyErr_SetString(PyExc_NotImplementedError, \
!         "Not available in this shared library/OS version"); \
!         return NULL; \
      }} while(0)
  
***************
*** 81,85 ****
  	OSStatus _err;
  	Duration inDelay;
! 	if (!PyArg_ParseTuple(_args, "l",
  	                      &inDelay))
  		return NULL;
--- 81,85 ----
  	OSStatus _err;
  	Duration inDelay;
! 	if (!PyArg_ParseTuple(_args, "k",
  	                      &inDelay))
  		return NULL;
***************
*** 100,104 ****
  	_err = HMGetTagDelay(&outDelay);
  	if (_err != noErr) return PyMac_Error(_err);
! 	_res = Py_BuildValue("l",
  	                     outDelay);
  	return _res;
--- 100,104 ----
  	_err = HMGetTagDelay(&outDelay);
  	if (_err != noErr) return PyMac_Error(_err);
! 	_res = Py_BuildValue("k",
  	                     outDelay);
  	return _res;
***************
*** 111,115 ****
  	MenuRef inMenu;
  	SInt16 inHmnuRsrcID;
! 	if (!PyArg_ParseTuple(_args, "O&h",
  	                      MenuObj_Convert, &inMenu,
  	                      &inHmnuRsrcID))
--- 111,115 ----
  	MenuRef inMenu;
  	SInt16 inHmnuRsrcID;
! 	if (!PyArg_ParseTuple(_args, "O&H",
  	                      MenuObj_Convert, &inMenu,
  	                      &inHmnuRsrcID))
***************
*** 130,134 ****
  	SInt16 inHdlgRsrcID;
  	SInt16 inItemStart;
! 	if (!PyArg_ParseTuple(_args, "O&hh",
  	                      DlgObj_Convert, &inDialog,
  	                      &inHdlgRsrcID,
--- 130,134 ----
  	SInt16 inHdlgRsrcID;
  	SInt16 inItemStart;
! 	if (!PyArg_ParseTuple(_args, "O&HH",
  	                      DlgObj_Convert, &inDialog,
  	                      &inHdlgRsrcID,