mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Use ResObj_OptNew for GetDialogItem return value: the handle returned
may be NULL (for user items, for instance).
This commit is contained in:
parent
9f37c6d91c
commit
91a6398b17
2 changed files with 10 additions and 0 deletions
|
@ -13,6 +13,12 @@ from macsupport import *
|
|||
DialogPtr = OpaqueByValueType("DialogPtr", "DlgObj")
|
||||
DialogRef = DialogPtr
|
||||
|
||||
# XXXX There must be a more elegant way to do this. An OptHandle is
|
||||
# either a handle or None (in case NULL is passed in). This is needed
|
||||
# for GetDialogItem().
|
||||
OptHandle = OpaqueByValueType("Handle", "ResObj")
|
||||
OptHandle.new = "ResObj_OptNew"
|
||||
|
||||
ModalFilterProcPtr = InputOnlyType("PyObject*", "O")
|
||||
ModalFilterProcPtr.passInput = lambda name: "NewModalFilterProc(Dlg_PassFilterProc(%s))" % name
|
||||
ModalFilterUPP = ModalFilterProcPtr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue