[Python-checkins] CVS: python/dist/src/Mac/Modules/mlte Mltemodule.c,1.3,1.4
Jack Jansen
jackjansen@users.sourceforge.net
Mon, 16 Jul 2001 14:58:38 -0700
Update of /cvsroot/python/python/dist/src/Mac/Modules/mlte
In directory usw-pr-cvs1:/tmp/cvs-serv16283/Python/Mac/Modules/mlte
Modified Files:
Mltemodule.c
Log Message:
The TNXDraw gworld argument is optional.
Index: Mltemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/mlte/Mltemodule.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Mltemodule.c 2001/07/14 14:00:41 1.3
--- Mltemodule.c 2001/07/16 21:58:35 1.4
***************
*** 71,74 ****
--- 71,88 ----
}
+ /*
+ ** 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);
+ }
+
static PyObject *Mlte_Error;
***************
*** 277,281 ****
PyMac_PRECHECK(TXNDraw);
if (!PyArg_ParseTuple(_args, "O&",
! GWorldObj_Convert, &iDrawPort))
return NULL;
TXNDraw(_self->ob_itself,
--- 291,295 ----
PyMac_PRECHECK(TXNDraw);
if (!PyArg_ParseTuple(_args, "O&",
! OptGWorldObj_Convert, &iDrawPort))
return NULL;
TXNDraw(_self->ob_itself,