[Python-checkins] python/dist/src/Mac/Modules/ctl _Ctlmodule.c,1.24,1.24.6.1 ctlsupport.py,1.53,1.53.6.1
jackjansen@users.sourceforge.net
jackjansen@users.sourceforge.net
2003年4月18日 01:59:10 -0700
Update of /cvsroot/python/python/dist/src/Mac/Modules/ctl
In directory sc8-pr-cvs1:/tmp/cvs-serv28363/Mac/Modules/ctl
Modified Files:
Tag: getargs_mask_mods
_Ctlmodule.c ctlsupport.py
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: _Ctlmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/_Ctlmodule.c,v
retrieving revision 1.24
retrieving revision 1.24.6.1
diff -C2 -d -r1.24 -r1.24.6.1
*** _Ctlmodule.c 23 Dec 2002 23:16:21 -0000 1.24
--- _Ctlmodule.c 18 Apr 2003 08:58:36 -0000 1.24.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 ) {\
[...1103 lines suppressed...]
PyMac_GetRect, &inBoundsRect,
--- 5284,5288 ----
PyMac_PRECHECK(CreateRoundButtonControl);
#endif
! if (!PyArg_ParseTuple(_args, "O&O&HO&",
WinObj_Convert, &inWindow,
PyMac_GetRect, &inBoundsRect,
***************
*** 5380,5384 ****
inWindow,
&outPart);
! _res = Py_BuildValue("O&h",
CtlObj_WhichControl, _rv,
outPart);
--- 5380,5384 ----
inWindow,
&outPart);
! _res = Py_BuildValue("O&H",
CtlObj_WhichControl, _rv,
outPart);
Index: ctlsupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/ctlsupport.py,v
retrieving revision 1.53
retrieving revision 1.53.6.1
diff -C2 -d -r1.53 -r1.53.6.1
*** ctlsupport.py 12 Dec 2002 10:31:50 -0000 1.53
--- ctlsupport.py 18 Apr 2003 08:58:36 -0000 1.53.6.1
***************
*** 34,38 ****
IconTransformType = Type("IconTransformType", "h")
EventModifiers = Type("EventModifiers", "H")
! ClickActivationResult = Type("ClickActivationResult", "l")
ControlButtonGraphicAlignment = Type("ControlButtonGraphicAlignment", "h")
ControlButtonTextAlignment = Type("ControlButtonTextAlignment", "h")
--- 34,38 ----
IconTransformType = Type("IconTransformType", "h")
EventModifiers = Type("EventModifiers", "H")
! ClickActivationResult = Type("ClickActivationResult", "k")
ControlButtonGraphicAlignment = Type("ControlButtonGraphicAlignment", "h")
ControlButtonTextAlignment = Type("ControlButtonTextAlignment", "h")
***************
*** 172,176 ****
PyControlID_Convert(PyObject *v, ControlID *itself)
{
! return PyArg_Parse(v, "(O&l)", PyMac_GetOSType, &itself->signature, &itself->id);
}
--- 172,176 ----
PyControlID_Convert(PyObject *v, ControlID *itself)
{
! return PyArg_Parse(v, "(O&k)", PyMac_GetOSType, &itself->signature, &itself->id);
}
***************
*** 181,185 ****
DataBrowserTableViewColumnDesc_Convert(PyObject *v, DataBrowserTableViewColumnDesc *itself)
{
! return PyArg_Parse(v, "(lO&l)",
&itself->propertyID,
PyMac_GetOSType, &itself->propertyType,
--- 181,185 ----
DataBrowserTableViewColumnDesc_Convert(PyObject *v, DataBrowserTableViewColumnDesc *itself)
{
! return PyArg_Parse(v, "(kO&k)",
&itself->propertyID,
PyMac_GetOSType, &itself->propertyType,