Message225494
> The patch appears to change it to 2 in tkinter/__init__.py.
This is for development only. You can apply the patch and test how new mode
affects IDLE or other applications.
> One thing slightly puzzles me: the current PythonCmd is used in a call to
> Tcl_CreateCommand. (Since the latter is not in _tkinter, I presume it is
> 'imported' in one of the includes.) The new PythonObjCmd is passed to
> Tcl_CreateObjCommand. Does that already exist, just waiting for us to add
> PythonObjCmd?
All Tcl_* functions are Tcl C API functions. Old functions work with strings
(char *). Modern functions (have "Obj" in a name) work with specialized Tcl
objects (Tcl_Obj *).
> I near as I can tell, the only differences between PythonCmd and
> PythonOjbCmd are /argv/objv/ and the following.
>
> PyObject *s = unicodeFromTclString(argv[i + 1]);
> PyObject *s = FromObj(data->self, objv[i + 1]);
>
> I think I would make the name substitution either in both or neither. It
> would be nice to reuse the rest of the code.
I'm not sure that I understand all you mean, but in updated patch the common
code are extracted to separate function. |
|
Date |
User |
Action |
Args |
2014-08-18 14:52:45 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, terry.reedy, gpolo |
2014-08-18 14:52:45 | serhiy.storchaka | link | issue22214 messages |
2014-08-18 14:52:45 | serhiy.storchaka | create | |
|