diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-02-27 22:50:50 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-02-27 22:50:50 (GMT) |
commit | f92ec2d191c96668450fabe66138ea2d404bfd7b (patch) | |
tree | df0c0b8af54d932dd0a8f26abc622938e056f13d | |
parent | fb3c811d9bebdc5f3442a0141acc6c43cea42f65 (diff) | |
download | cpython-f92ec2d191c96668450fabe66138ea2d404bfd7b.zip cpython-f92ec2d191c96668450fabe66138ea2d404bfd7b.tar.gz cpython-f92ec2d191c96668450fabe66138ea2d404bfd7b.tar.bz2 |
StdFilterProc() uses InOut parameters.
-rw-r--r-- | Mac/Modules/dlg/_Dlgmodule.c | 12 | ||||
-rw-r--r-- | Mac/Modules/dlg/dlgscan.py | 7 |
2 files changed, 14 insertions, 5 deletions
diff --git a/Mac/Modules/dlg/_Dlgmodule.c b/Mac/Modules/dlg/_Dlgmodule.c index c4e3ed8..3e0bc6d 100644 --- a/Mac/Modules/dlg/_Dlgmodule.c +++ b/Mac/Modules/dlg/_Dlgmodule.c @@ -14,9 +14,9 @@ /* 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; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) @@ -502,7 +502,9 @@ static PyObject *DlgObj_StdFilterProc(DialogObject *_self, PyObject *_args) #ifndef StdFilterProc PyMac_PRECHECK(StdFilterProc); #endif - if (!PyArg_ParseTuple(_args, "")) + if (!PyArg_ParseTuple(_args, "O&h", + PyMac_GetEventRecord, &event, + &itemHit)) return NULL; _rv = StdFilterProc(_self->ob_itself, &event, @@ -903,7 +905,7 @@ static PyMethodDef DlgObj_methods[] = { {"RemoveDialogItems", (PyCFunction)DlgObj_RemoveDialogItems, 1, PyDoc_STR("(DialogItemIndex itemNo, DialogItemIndex amountToRemove, Boolean disposeItemData) -> None")}, {"StdFilterProc", (PyCFunction)DlgObj_StdFilterProc, 1, - PyDoc_STR("() -> (Boolean _rv, EventRecord event, DialogItemIndex itemHit)")}, + PyDoc_STR("(EventRecord event, DialogItemIndex itemHit) -> (Boolean _rv, EventRecord event, DialogItemIndex itemHit)")}, {"SetDialogDefaultItem", (PyCFunction)DlgObj_SetDialogDefaultItem, 1, PyDoc_STR("(DialogItemIndex newItem) -> None")}, {"SetDialogCancelItem", (PyCFunction)DlgObj_SetDialogCancelItem, 1, diff --git a/Mac/Modules/dlg/dlgscan.py b/Mac/Modules/dlg/dlgscan.py index 9567419..3710d5d 100644 --- a/Mac/Modules/dlg/dlgscan.py +++ b/Mac/Modules/dlg/dlgscan.py @@ -99,6 +99,13 @@ class MyScanner(Scanner): [("ExistingWindowPtr", "*", "*")]), ([("WindowPtr", "*", "ReturnMode")], [("ExistingWindowPtr", "*", "*")]), + + # StdFilterProc + ([('EventRecord', 'event', 'OutMode'), + ('DialogItemIndex', 'itemHit', 'OutMode')], + [('EventRecord', 'event', 'InOutMode'), + ('DialogItemIndex', 'itemHit', 'InOutMode')]) + ] def writeinitialdefs(self): |