diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-07-16 21:58:44 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-07-16 21:58:44 (GMT) |
commit | e85e4e43bd582c795a4055d6bc3b9aca3fc691ba (patch) | |
tree | 555a8fa33161db44dd8ab42ac166a27eab115ff1 /Mac/Modules/mlte/mltesupport.py | |
parent | e160fe13dac28a2df1452dd53047592606944413 (diff) | |
download | cpython-e85e4e43bd582c795a4055d6bc3b9aca3fc691ba.zip cpython-e85e4e43bd582c795a4055d6bc3b9aca3fc691ba.tar.gz cpython-e85e4e43bd582c795a4055d6bc3b9aca3fc691ba.tar.bz2 |
The TNXDraw gworld argument is optional.
Diffstat (limited to 'Mac/Modules/mlte/mltesupport.py')
-rw-r--r-- | Mac/Modules/mlte/mltesupport.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Mac/Modules/mlte/mltesupport.py b/Mac/Modules/mlte/mltesupport.py index a7969e7..a1152be 100644 --- a/Mac/Modules/mlte/mltesupport.py +++ b/Mac/Modules/mlte/mltesupport.py @@ -74,6 +74,20 @@ OptRectPtr_Convert(PyObject *v, Rect **p_itself) return PyMac_GetRect(v, *p_itself); } +/* +** Parse an optional GWorld +*/ +static int +OptGWorldObj_Convert(PyObject *v, GWorldPtr *p_itself) +{ + if (v == Py_None) + { + *p_itself = NULL; + return 1; + } + return GWorldObj_Convert(v, p_itself); +} + """ initstuff = initstuff + """ @@ -109,6 +123,7 @@ DragTrackingMessage = Type("DragTrackingMessage", "h") RgnHandle = OpaqueByValueType("RgnHandle", "ResObj") OptRgnHandle = OpaqueByValueType("RgnHandle", "OptResObj") GWorldPtr = OpaqueByValueType("GWorldPtr", "GWorldObj") +OptGWorldPtr = OpaqueByValueType("GWorldPtr", "OptGWorldObj") MlteInBuffer = VarInputBufferType('void *', 'ByteCount', 'l') OptFSSpecPtr = OpaqueByValueType("FSSpec *", "OptFSSpecPtr") |