Message279300
At least with python 3.4 here wantobjects still is valid, and personally I really hope that it remains this way, because I use to set wantobjects=False in my own code to avoid having to deal with errors because of some method or other unexpectedly returning TclObjects instead of Python objects (which has been happening here occasionally ever since they were invented).
I am practically illiterate with C, so I cannot tell what this code does, but at least I believe I see clearly here that it appears to be still used:
static TkappObject *
Tkapp_New(const char *screenName, const char *className,
int interactive, int wantobjects, int wantTk, int sync,
const char *use)
{
TkappObject *v;
char *argv0;
v = PyObject_New(TkappObject, (PyTypeObject *) Tkapp_Type);
if (v == NULL)
return NULL;
Py_INCREF(Tkapp_Type);
v->interp = Tcl_CreateInterp();
v->wantobjects = wantobjects;
v->threaded = Tcl_GetVar2Ex(v->interp, "tcl_platform", "threaded",
TCL_GLOBAL_ONLY) != NULL;
v->thread_id = Tcl_GetCurrentThread();
v->dispatching = 0;
(...)
static PyObject*
Tkapp_CallResult(TkappObject *self)
{
PyObject *res = NULL;
Tcl_Obj *value = Tcl_GetObjResult(self->interp);
if(self->wantobjects) {
/* Not sure whether the IncrRef is necessary, but something
may overwrite the interpreter result while we are
converting it. */
Tcl_IncrRefCount(value);
res = FromObj((PyObject*)self, value);
Tcl_DecrRefCount(value);
} else {
res = unicodeFromTclObj(value);
}
return res;
} |
|
Date |
User |
Action |
Args |
2016-10-24 09:21:40 | klappnase | set | recipients:
+ klappnase, serhiy.storchaka, tkinter, GNJ |
2016-10-24 09:21:39 | klappnase | set | messageid: <1477300899.98.0.790604832096.issue28498@psf.upfronthosting.co.za> |
2016-10-24 09:21:39 | klappnase | link | issue28498 messages |
2016-10-24 09:21:38 | klappnase | create | |
|