[issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()

2014-09-11 Thread STINNER Victor
STINNER Victor added the comment: > And to me too. Please commit it, this is mainly your patch. Ok, thanks, done. -- ___ Python tracker ___ _

[issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()

2014-09-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9f1d3e6e6ce6 by Victor Stinner in branch 'default': Closes #22336: attemptckalloc() with PyMem_Malloc() in _tkinter http://hg.python.org/cpython/rev/9f1d3e6e6ce6 -- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open ->

[issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And to me too. Please commit it, this is mainly your patch. -- ___ Python tracker ___ ___ Python-b

[issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()

2014-09-11 Thread STINNER Victor
STINNER Victor added the comment: tkinter_pymem_3.patch looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > * Tkapp_CallDeallocArgs() ckfree() on memory allocated by PyMem_Malloc() => > wrong Oh, you are right, thanks. > (see my review on Rietveld). Perhaps you forgot to press the "Publish" button. -- Added file: http://bugs.python.org/file36599/tkinte

[issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()

2014-09-11 Thread STINNER Victor
STINNER Victor added the comment: I read tkinter_pymem_2.patch. Remaining calls to ckalloc(): * they are only used to allocate events passed later to Tcl_ThreadQueueEvent(). Tcl_ThreadQueueEvent doc explicitly says that the memory must be allocated by Tcl_Alloc or ckalloc, so it's correct (Py

[issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is updated patch which is synchronized with the tip after changes made in issue21951 and addresses my comments. -- Added file: http://bugs.python.org/file36596/tkinter_pymem_2.patch ___ Python tracker

[issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()

2014-09-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Event structs (Tkapp_CallEvent, VarEvent, CommandEvent) must have been allocated by the caller using Tcl_Alloc or ckalloc (see man Tcl_ThreadQueueEvent). -- ___ Python tracker

[issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()

2014-09-04 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Tkinter ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()

2014-09-04 Thread STINNER Victor
STINNER Victor added the comment: >PyMem_Free(FREECAST argv); FREECAST can be dropped here, PyMem_Free() always takes a void* pointer. -- ___ Python tracker ___

[issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()

2014-09-04 Thread STINNER Victor
New submission from STINNER Victor: The PyMem_Malloc(size) function has a well defined behaviour: if size is 0, a pointer different than NULL is returned. It looks like ckalloc(size) returns NULL if the size is NULL: see issue #21951 (bug on AIX). Moreover, memory allocated by ckalloc() is not