the address of the Tcl interpreter object, as an integer. Not very
useful for the Python programmer, but this can be called by another C
extension that needs to make calls into the Tcl/Tk C API and needs to
get the address of the Tcl interpreter object. A simple cast of the
return value to (Tcl_Interp *) will do the trick now.
return Py_None;
}
+static PyObject *
+Tkapp_InterpAddr(self, args)
+ PyObject *self;
+ PyObject *args;
+{
+
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+
+ return PyInt_FromLong((long)Tkapp_Interp(self));
+}
+
\f
/**** Tkapp Method List ****/
{"mainloop", Tkapp_MainLoop, 1},
{"dooneevent", Tkapp_DoOneEvent, 1},
{"quit", Tkapp_Quit, 1},
+ {"interpaddr", Tkapp_InterpAddr, 1},
{NULL, NULL}
};