[Python-checkins] python/dist/src/Mac/Modules/evt _Evtmodule.c,1.8,1.8.6.1
jackjansen@users.sourceforge.net
jackjansen@users.sourceforge.net
Fri, 18 Apr 2003 01:59:12 -0700
Update of /cvsroot/python/python/dist/src/Mac/Modules/evt
In directory sc8-pr-cvs1:/tmp/cvs-serv28363/Mac/Modules/evt
Modified Files:
Tag: getargs_mask_mods
_Evtmodule.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: _Evtmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/evt/_Evtmodule.c,v
retrieving revision 1.8
retrieving revision 1.8.6.1
diff -C2 -d -r1.8 -r1.8.6.1
*** _Evtmodule.c 12 Dec 2002 10:31:50 -0000 1.8
--- _Evtmodule.c 18 Apr 2003 08:58:39 -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)
***************
*** 100,104 ****
return NULL;
_rv = GetCaretTime();
! _res = Py_BuildValue("l",
_rv);
return _res;
--- 100,104 ----
return NULL;
_rv = GetCaretTime();
! _res = Py_BuildValue("k",
_rv);
return _res;
***************
*** 130,134 ****
return NULL;
_rv = GetDblTime();
! _res = Py_BuildValue("l",
_rv);
return _res;
--- 130,134 ----
return NULL;
_rv = GetDblTime();
! _res = Py_BuildValue("k",
_rv);
return _res;
***************
*** 200,204 ****
PyMac_PRECHECK(PostEvent);
#endif
! if (!PyArg_ParseTuple(_args, "Hl",
&eventNum,
&eventMsg))
--- 200,204 ----
PyMac_PRECHECK(PostEvent);
#endif
! if (!PyArg_ParseTuple(_args, "Hk",
&eventNum,
&eventMsg))
***************
*** 256,260 ****
return NULL;
_rv = GetCurrentKeyModifiers();
! _res = Py_BuildValue("l",
_rv);
return _res;
--- 256,260 ----
return NULL;
_rv = GetCurrentKeyModifiers();
! _res = Py_BuildValue("k",
_rv);
return _res;
***************
*** 283,287 ****
PyMac_PRECHECK(KeyScript);
#endif
! if (!PyArg_ParseTuple(_args, "h",
&code))
return NULL;
--- 283,287 ----
PyMac_PRECHECK(KeyScript);
#endif
! if (!PyArg_ParseTuple(_args, "H",
&code))
return NULL;
***************
*** 301,305 ****
PyMac_PRECHECK(IsCmdChar);
#endif
! if (!PyArg_ParseTuple(_args, "O&h",
PyMac_GetEventRecord, &event,
&test))
--- 301,305 ----
PyMac_PRECHECK(IsCmdChar);
#endif
! if (!PyArg_ParseTuple(_args, "O&H",
PyMac_GetEventRecord, &event,
&test))
***************
*** 322,326 ****
return NULL;
_rv = LMGetKeyThresh();
! _res = Py_BuildValue("h",
_rv);
return _res;
--- 322,326 ----
return NULL;
_rv = LMGetKeyThresh();
! _res = Py_BuildValue("H",
_rv);
return _res;
***************
*** 334,338 ****
PyMac_PRECHECK(LMSetKeyThresh);
#endif
! if (!PyArg_ParseTuple(_args, "h",
&value))
return NULL;
--- 334,338 ----
PyMac_PRECHECK(LMSetKeyThresh);
#endif
! if (!PyArg_ParseTuple(_args, "H",
&value))
return NULL;
***************
*** 353,357 ****
return NULL;
_rv = LMGetKeyRepThresh();
! _res = Py_BuildValue("h",
_rv);
return _res;
--- 353,357 ----
return NULL;
_rv = LMGetKeyRepThresh();
! _res = Py_BuildValue("H",
_rv);
return _res;
***************
*** 365,369 ****
PyMac_PRECHECK(LMSetKeyRepThresh);
#endif
! if (!PyArg_ParseTuple(_args, "h",
&value))
return NULL;
--- 365,369 ----
PyMac_PRECHECK(LMSetKeyRepThresh);
#endif
! if (!PyArg_ParseTuple(_args, "H",
&value))
return NULL;
***************
*** 446,450 ****
return NULL;
_rv = TickCount();
! _res = Py_BuildValue("l",
_rv);
return _res;
--- 446,450 ----
return NULL;
_rv = TickCount();
! _res = Py_BuildValue("k",
_rv);
return _res;