summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/dlg
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-02-21 20:56:21 (GMT)
committerGuido van Rossum <guido@python.org>1995-02-21 20:56:21 (GMT)
commit0437e890414cd6b34e7ab74d03ba3eab90e29bcb (patch)
treec761cb2b9298e77071e27955bc27dd7f647e3eb1 /Mac/Modules/dlg
parentf74c36c9dc959f228656f36094b2bf3969f9b6c1 (diff)
downloadcpython-0437e890414cd6b34e7ab74d03ba3eab90e29bcb.zip
cpython-0437e890414cd6b34e7ab74d03ba3eab90e29bcb.tar.gz
cpython-0437e890414cd6b34e7ab74d03ba3eab90e29bcb.tar.bz2
fix bug in filterproc interface
Diffstat (limited to 'Mac/Modules/dlg')
-rw-r--r--Mac/Modules/dlg/Dlgmodule.c2
-rw-r--r--Mac/Modules/dlg/dlggen.py27
-rw-r--r--Mac/Modules/dlg/dlgsupport.py2
3 files changed, 3 insertions, 28 deletions
diff --git a/Mac/Modules/dlg/Dlgmodule.c b/Mac/Modules/dlg/Dlgmodule.c
index 0cd9dbb..b297e1c 100644
--- a/Mac/Modules/dlg/Dlgmodule.c
+++ b/Mac/Modules/dlg/Dlgmodule.c
@@ -55,7 +55,7 @@ static pascal Boolean Dlg_UnivFilterProc(DialogPtr dialog,
if (callback == NULL)
return 0; /* Default behavior */
Dlg_FilterProc_callback = NULL; /* We'll restore it when call successful */
- args = Py_BuildValue("O&s#", DlgObj_New, dialog, event, (int)sizeof(EventRecord));
+ args = Py_BuildValue("O&O&", WinObj_WhichWindow, dialog, PyMac_BuildEventRecord, event);
if (args == NULL)
res = NULL;
else {
diff --git a/Mac/Modules/dlg/dlggen.py b/Mac/Modules/dlg/dlggen.py
index ea64ab7..bd65cd0 100644
--- a/Mac/Modules/dlg/dlggen.py
+++ b/Mac/Modules/dlg/dlggen.py
@@ -20,16 +20,6 @@ f = Function(DialogPtr, 'GetNewDialog',
)
functions.append(f)
-f = Function(void, 'CouldDialog',
- (short, 'dialogID', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'FreeDialog',
- (short, 'dialogID', InMode),
-)
-functions.append(f)
-
f = Function(void, 'ParamText',
(ConstStr255Param, 'param0', InMode),
(ConstStr255Param, 'param1', InMode),
@@ -61,12 +51,6 @@ f = Method(void, 'DrawDialog',
)
methods.append(f)
-f = Method(void, 'UpdtDialog',
- (DialogPtr, 'theDialog', InMode),
- (RgnHandle, 'updateRgn', InMode),
-)
-methods.append(f)
-
f = Method(void, 'UpdateDialog',
(DialogPtr, 'theDialog', InMode),
(RgnHandle, 'updateRgn', InMode),
@@ -97,16 +81,6 @@ f = Function(short, 'CautionAlert',
)
functions.append(f)
-f = Function(void, 'CouldAlert',
- (short, 'alertID', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'FreeAlert',
- (short, 'alertID', InMode),
-)
-functions.append(f)
-
f = Method(void, 'GetDItem',
(DialogPtr, 'theDialog', InMode),
(short, 'itemNo', InMode),
@@ -222,3 +196,4 @@ f = Method(void, 'ShortenDITL',
(short, 'numberItems', InMode),
)
methods.append(f)
+
diff --git a/Mac/Modules/dlg/dlgsupport.py b/Mac/Modules/dlg/dlgsupport.py
index 1eb5576..d3491fe 100644
--- a/Mac/Modules/dlg/dlgsupport.py
+++ b/Mac/Modules/dlg/dlgsupport.py
@@ -40,7 +40,7 @@ static pascal Boolean Dlg_UnivFilterProc(DialogPtr dialog,
if (callback == NULL)
return 0; /* Default behavior */
Dlg_FilterProc_callback = NULL; /* We'll restore it when call successful */
- args = Py_BuildValue("O&s#", DlgObj_New, dialog, event, (int)sizeof(EventRecord));
+ args = Py_BuildValue("O&O&", WinObj_WhichWindow, dialog, PyMac_BuildEventRecord, event);
if (args == NULL)
res = NULL;
else {