[Python-checkins] python/dist/src/Mac/Modules/dlg _Dlgmodule.c,1.18,1.18.2.1

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


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

Modified Files:
      Tag: getargs_mask_mods
	_Dlgmodule.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: _Dlgmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/dlg/_Dlgmodule.c,v
retrieving revision 1.18
retrieving revision 1.18.2.1
diff -C2 -d -r1.18 -r1.18.2.1
*** _Dlgmodule.c	27 Feb 2003 22:50:49 -0000	1.18
--- _Dlgmodule.c	18 Apr 2003 08:58:37 -0000	1.18.2.1
***************
*** 375,379 ****
  	PyMac_PRECHECK(SelectDialogItemText);
  #endif
! 	if (!PyArg_ParseTuple(_args, "hhh",
  	                      &itemNo,
  	                      &strtSel,
--- 375,379 ----
  	PyMac_PRECHECK(SelectDialogItemText);
  #endif
! 	if (!PyArg_ParseTuple(_args, "hHH",
  	                      &itemNo,
  	                      &strtSel,
***************
*** 599,603 ****
  	PyMac_PRECHECK(GetDialogItemAsControl);
  #endif
! 	if (!PyArg_ParseTuple(_args, "h",
  	                      &inItemNo))
  		return NULL;
--- 599,603 ----
  	PyMac_PRECHECK(GetDialogItemAsControl);
  #endif
! 	if (!PyArg_ParseTuple(_args, "H",
  	                      &inItemNo))
  		return NULL;
***************
*** 621,625 ****
  	PyMac_PRECHECK(MoveDialogItem);
  #endif
! 	if (!PyArg_ParseTuple(_args, "hhh",
  	                      &inItemNo,
  	                      &inHoriz,
--- 621,625 ----
  	PyMac_PRECHECK(MoveDialogItem);
  #endif
! 	if (!PyArg_ParseTuple(_args, "HHH",
  	                      &inItemNo,
  	                      &inHoriz,
***************
*** 646,650 ****
  	PyMac_PRECHECK(SizeDialogItem);
  #endif
! 	if (!PyArg_ParseTuple(_args, "hhh",
  	                      &inItemNo,
  	                      &inWidth,
--- 646,650 ----
  	PyMac_PRECHECK(SizeDialogItem);
  #endif
! 	if (!PyArg_ParseTuple(_args, "HHH",
  	                      &inItemNo,
  	                      &inWidth,
***************
*** 670,674 ****
  	PyMac_PRECHECK(AppendDialogItemList);
  #endif
! 	if (!PyArg_ParseTuple(_args, "hh",
  	                      &ditlID,
  	                      &method))
--- 670,674 ----
  	PyMac_PRECHECK(AppendDialogItemList);
  #endif
! 	if (!PyArg_ParseTuple(_args, "Hh",
  	                      &ditlID,
  	                      &method))
***************
*** 692,696 ****
  	PyMac_PRECHECK(SetDialogTimeout);
  #endif
! 	if (!PyArg_ParseTuple(_args, "hl",
  	                      &inButtonToPress,
  	                      &inSecondsToWait))
--- 692,696 ----
  	PyMac_PRECHECK(SetDialogTimeout);
  #endif
! 	if (!PyArg_ParseTuple(_args, "Hk",
  	                      &inButtonToPress,
  	                      &inSecondsToWait))
***************
*** 722,726 ****
  	                        &outSecondsRemaining);
  	if (_err != noErr) return PyMac_Error(_err);
! 	_res = Py_BuildValue("hll",
  	                     outButtonToPress,
  	                     outSecondsToWait,
--- 722,726 ----
  	                        &outSecondsRemaining);
  	if (_err != noErr) return PyMac_Error(_err);
! 	_res = Py_BuildValue("Hkk",
  	                     outButtonToPress,
  	                     outSecondsToWait,
***************
*** 806,810 ****
  		return NULL;
  	_rv = GetDialogDefaultItem(_self->ob_itself);
! 	_res = Py_BuildValue("h",
  	                     _rv);
  	return _res;
--- 806,810 ----
  		return NULL;
  	_rv = GetDialogDefaultItem(_self->ob_itself);
! 	_res = Py_BuildValue("H",
  	                     _rv);
  	return _res;
***************
*** 821,825 ****
  		return NULL;
  	_rv = GetDialogCancelItem(_self->ob_itself);
! 	_res = Py_BuildValue("h",
  	                     _rv);
  	return _res;
--- 821,825 ----
  		return NULL;
  	_rv = GetDialogCancelItem(_self->ob_itself);
! 	_res = Py_BuildValue("H",
  	                     _rv);
  	return _res;
***************
*** 836,840 ****
  		return NULL;
  	_rv = GetDialogKeyboardFocusItem(_self->ob_itself);
! 	_res = Py_BuildValue("h",
  	                     _rv);
  	return _res;
--- 836,840 ----
  		return NULL;
  	_rv = GetDialogKeyboardFocusItem(_self->ob_itself);
! 	_res = Py_BuildValue("H",
  	                     _rv);
  	return _res;
***************
*** 1045,1049 ****
  	PyMac_PRECHECK(NewDialog);
  #endif
! 	if (!PyArg_ParseTuple(_args, "O&O&bhO&blO&",
  	                      PyMac_GetRect, &boundsRect,
  	                      PyMac_GetStr255, title,
--- 1045,1049 ----
  	PyMac_PRECHECK(NewDialog);
  #endif
! 	if (!PyArg_ParseTuple(_args, "O&O&bHO&blO&",
  	                      PyMac_GetRect, &boundsRect,
  	                      PyMac_GetStr255, title,
***************
*** 1078,1082 ****
  	PyMac_PRECHECK(GetNewDialog);
  #endif
! 	if (!PyArg_ParseTuple(_args, "hO&",
  	                      &dialogID,
  	                      WinObj_Convert, &behind))
--- 1078,1082 ----
  	PyMac_PRECHECK(GetNewDialog);
  #endif
! 	if (!PyArg_ParseTuple(_args, "HO&",
  	                      &dialogID,
  	                      WinObj_Convert, &behind))
***************
*** 1105,1109 ****
  	PyMac_PRECHECK(NewColorDialog);
  #endif
! 	if (!PyArg_ParseTuple(_args, "O&O&bhO&blO&",
  	                      PyMac_GetRect, &boundsRect,
  	                      PyMac_GetStr255, title,
--- 1105,1109 ----
  	PyMac_PRECHECK(NewColorDialog);
  #endif
! 	if (!PyArg_ParseTuple(_args, "O&O&bHO&blO&",
  	                      PyMac_GetRect, &boundsRect,
  	                      PyMac_GetStr255, title,
***************
*** 1196,1200 ****
  	PyMac_PRECHECK(Alert);
  #endif
! 	if (!PyArg_ParseTuple(_args, "hO",
  	                      &alertID,
  	                      &modalFilter))
--- 1196,1200 ----
  	PyMac_PRECHECK(Alert);
  #endif
! 	if (!PyArg_ParseTuple(_args, "HO",
  	                      &alertID,
  	                      &modalFilter))
***************
*** 1216,1220 ****
  	PyMac_PRECHECK(StopAlert);
  #endif
! 	if (!PyArg_ParseTuple(_args, "hO",
  	                      &alertID,
  	                      &modalFilter))
--- 1216,1220 ----
  	PyMac_PRECHECK(StopAlert);
  #endif
! 	if (!PyArg_ParseTuple(_args, "HO",
  	                      &alertID,
  	                      &modalFilter))
***************
*** 1236,1240 ****
  	PyMac_PRECHECK(NoteAlert);
  #endif
! 	if (!PyArg_ParseTuple(_args, "hO",
  	                      &alertID,
  	                      &modalFilter))
--- 1236,1240 ----
  	PyMac_PRECHECK(NoteAlert);
  #endif
! 	if (!PyArg_ParseTuple(_args, "HO",
  	                      &alertID,
  	                      &modalFilter))
***************
*** 1256,1260 ****
  	PyMac_PRECHECK(CautionAlert);
  #endif
! 	if (!PyArg_ParseTuple(_args, "hO",
  	                      &alertID,
  	                      &modalFilter))
--- 1256,1260 ----
  	PyMac_PRECHECK(CautionAlert);
  #endif
! 	if (!PyArg_ParseTuple(_args, "HO",
  	                      &alertID,
  	                      &modalFilter))
***************
*** 1339,1343 ****
  		return NULL;
  	_rv = GetAlertStage();
! 	_res = Py_BuildValue("h",
  	                     _rv);
  	return _res;
--- 1339,1343 ----
  		return NULL;
  	_rv = GetAlertStage();
! 	_res = Py_BuildValue("H",
  	                     _rv);
  	return _res;
***************
*** 1351,1355 ****
  	PyMac_PRECHECK(SetDialogFont);
  #endif
! 	if (!PyArg_ParseTuple(_args, "h",
  	                      &fontNum))
  		return NULL;
--- 1351,1355 ----
  	PyMac_PRECHECK(SetDialogFont);
  #endif
! 	if (!PyArg_ParseTuple(_args, "H",
  	                      &fontNum))
  		return NULL;
***************
*** 1415,1419 ****
  	PyMac_PRECHECK(NewFeaturesDialog);
  #endif
! 	if (!PyArg_ParseTuple(_args, "O&O&bhO&blO&l",
  	                      PyMac_GetRect, &inBoundsRect,
  	                      PyMac_GetStr255, inTitle,
--- 1415,1419 ----
  	PyMac_PRECHECK(NewFeaturesDialog);
  #endif
! 	if (!PyArg_ParseTuple(_args, "O&O&bHO&blO&k",
  	                      PyMac_GetRect, &inBoundsRect,
  	                      PyMac_GetStr255, inTitle,