[Python-checkins] python/dist/src/Mac/Modules/cm _Cmmodule.c,1.15,1.15.6.1 cmsupport.py,1.8,1.8.6.1
jackjansen@users.sourceforge.net
jackjansen@users.sourceforge.net
Fri, 18 Apr 2003 01:59:08 -0700
Update of /cvsroot/python/python/dist/src/Mac/Modules/cm
In directory sc8-pr-cvs1:/tmp/cvs-serv28363/Mac/Modules/cm
Modified Files:
Tag: getargs_mask_mods
_Cmmodule.c cmsupport.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: _Cmmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cm/_Cmmodule.c,v
retrieving revision 1.15
retrieving revision 1.15.6.1
diff -C2 -d -r1.15 -r1.15.6.1
*** _Cmmodule.c 23 Dec 2002 23:16:21 -0000 1.15
--- _Cmmodule.c 18 Apr 2003 08:58:35 -0000 1.15.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)
***************
*** 56,60 ****
CmpDesc_Convert(PyObject *v, ComponentDescription *p_itself)
{
! return PyArg_ParseTuple(v, "O&O&O&ll",
PyMac_GetOSType, &p_itself->componentType,
PyMac_GetOSType, &p_itself->componentSubType,
--- 56,60 ----
CmpDesc_Convert(PyObject *v, ComponentDescription *p_itself)
{
! return PyArg_ParseTuple(v, "O&O&O&kk",
PyMac_GetOSType, &p_itself->componentType,
PyMac_GetOSType, &p_itself->componentSubType,
***************
*** 145,149 ****
PyMac_PRECHECK(SetComponentInstanceError);
#endif
! if (!PyArg_ParseTuple(_args, "h",
&theError))
return NULL;
--- 145,149 ----
PyMac_PRECHECK(SetComponentInstanceError);
#endif
! if (!PyArg_ParseTuple(_args, "H",
&theError))
return NULL;
***************
*** 195,199 ****
PyMac_PRECHECK(ComponentFunctionImplemented);
#endif
! if (!PyArg_ParseTuple(_args, "h",
&ftnNumber))
return NULL;
--- 195,199 ----
PyMac_PRECHECK(ComponentFunctionImplemented);
#endif
! if (!PyArg_ParseTuple(_args, "H",
&ftnNumber))
return NULL;
***************
*** 460,464 ****
PyMac_PRECHECK(GetComponentPublicIndString);
#endif
! if (!PyArg_ParseTuple(_args, "O&hh",
PyMac_GetStr255, theString,
&strListID,
--- 460,464 ----
PyMac_PRECHECK(GetComponentPublicIndString);
#endif
! if (!PyArg_ParseTuple(_args, "O&HH",
PyMac_GetStr255, theString,
&strListID,
***************
*** 517,521 ****
return NULL;
_rv = OpenComponentResFile(_self->ob_itself);
! _res = Py_BuildValue("h",
_rv);
return _res;
--- 517,521 ----
return NULL;
_rv = OpenComponentResFile(_self->ob_itself);
! _res = Py_BuildValue("H",
_rv);
return _res;
***************
*** 532,536 ****
PyMac_PRECHECK(GetComponentResource);
#endif
! if (!PyArg_ParseTuple(_args, "O&h",
PyMac_GetOSType, &resType,
&resID))
--- 532,536 ----
PyMac_PRECHECK(GetComponentResource);
#endif
! if (!PyArg_ParseTuple(_args, "O&H",
PyMac_GetOSType, &resType,
&resID))
***************
*** 556,560 ****
PyMac_PRECHECK(GetComponentIndString);
#endif
! if (!PyArg_ParseTuple(_args, "O&hh",
PyMac_GetStr255, theString,
&strListID,
--- 556,560 ----
PyMac_PRECHECK(GetComponentIndString);
#endif
! if (!PyArg_ParseTuple(_args, "O&HH",
PyMac_GetStr255, theString,
&strListID,
***************
*** 594,598 ****
PyMac_PRECHECK(SetDefaultComponent);
#endif
! if (!PyArg_ParseTuple(_args, "h",
&flags))
return NULL;
--- 594,598 ----
PyMac_PRECHECK(SetDefaultComponent);
#endif
! if (!PyArg_ParseTuple(_args, "H",
&flags))
return NULL;
***************
*** 774,778 ****
PyMac_PRECHECK(RegisterComponentResource);
#endif
! if (!PyArg_ParseTuple(_args, "O&h",
ResObj_Convert, &cr,
&global))
--- 774,778 ----
PyMac_PRECHECK(RegisterComponentResource);
#endif
! if (!PyArg_ParseTuple(_args, "O&H",
ResObj_Convert, &cr,
&global))
***************
*** 845,849 ****
PyMac_PRECHECK(CloseComponentResFile);
#endif
! if (!PyArg_ParseTuple(_args, "h",
&refnum))
return NULL;
--- 845,849 ----
PyMac_PRECHECK(CloseComponentResFile);
#endif
! if (!PyArg_ParseTuple(_args, "H",
&refnum))
return NULL;
***************
*** 884,888 ****
PyMac_PRECHECK(RegisterComponentResourceFile);
#endif
! if (!PyArg_ParseTuple(_args, "hh",
&resRefNum,
&global))
--- 884,888 ----
PyMac_PRECHECK(RegisterComponentResourceFile);
#endif
! if (!PyArg_ParseTuple(_args, "HH",
&resRefNum,
&global))
Index: cmsupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cm/cmsupport.py,v
retrieving revision 1.8
retrieving revision 1.8.6.1
diff -C2 -d -r1.8 -r1.8.6.1
*** cmsupport.py 3 Dec 2002 23:40:19 -0000 1.8
--- cmsupport.py 18 Apr 2003 08:58:36 -0000 1.8.6.1
***************
*** 57,61 ****
CmpDesc_Convert(PyObject *v, ComponentDescription *p_itself)
{
! return PyArg_ParseTuple(v, "O&O&O&ll",
PyMac_GetOSType, &p_itself->componentType,
PyMac_GetOSType, &p_itself->componentSubType,
--- 57,61 ----
CmpDesc_Convert(PyObject *v, ComponentDescription *p_itself)
{
! return PyArg_ParseTuple(v, "O&O&O&kk",
PyMac_GetOSType, &p_itself->componentType,
PyMac_GetOSType, &p_itself->componentSubType,
***************
*** 76,80 ****
Component = OpaqueByValueType('Component', C_OBJECTPREFIX)
ComponentInstance = OpaqueByValueType('ComponentInstance', CI_OBJECTPREFIX)
! ComponentResult = Type("ComponentResult", "l")
ComponentResourceHandle = OpaqueByValueType("ComponentResourceHandle", "ResObj")
--- 76,80 ----
Component = OpaqueByValueType('Component', C_OBJECTPREFIX)
ComponentInstance = OpaqueByValueType('ComponentInstance', CI_OBJECTPREFIX)
! ComponentResult = Type("ComponentResult", "k")
ComponentResourceHandle = OpaqueByValueType("ComponentResourceHandle", "ResObj")