summaryrefslogtreecommitdiffstats
path: root/Modules/_tkinter.c
Commit message (Collapse)AuthorAgeFilesLines
* [3.9] Fix typos in the Modules directory (GH-28761). (GH-28791)Christian Clauss2021-10-071-1/+1
| | | | | | | (cherry picked from commit dd02a696e55b450413e765e698e653d781ca4205) Co-authored-by: Christian Clauss <cclauss@me.com> Automerge-Triggered-By: GH:JulienPalard
* bpo-44608: Fix memory leak in _tkinter._flatten() (GH-27107)Miss Islington (bot)2021-07-141-1/+3
| | | | | | if it is called with a sequence or set, but not list or tuple. (cherry picked from commit f572cbf1faab33d9afbbe3e95738ed6fbe6e48e6) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Fix compiler warning for misleading guarding in the tkinter (GH-26244) ↵Miss Islington (bot)2021-05-191-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-26252) The newest gcc emmits this warning: ``` /Modules/_tkinter.c:272:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 272 | if(tcl_lock)PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = tstate; } | ^~ /Modules/_tkinter.c:2869:5: note: in expansion of macro ‘LEAVE_PYTHON’ 2869 | LEAVE_PYTHON | ^~~~~~~~~~~~ /Modules/_tkinter.c:243:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 243 | (*(PyThreadState**)Tcl_GetThreadData(&state_key, sizeof(PyThreadState*))) | ^ /Modules/_tkinter.c:272:57: note: in expansion of macro ‘tcl_tstate’ 272 | if(tcl_lock)PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = tstate; } | ^~~~~~~~~~ /Modules/_tkinter.c:2869:5: note: in expansion of macro ‘LEAVE_PYTHON’ 2869 | LEAVE_PYTHON ``` that's because the macro packs together two statements at the same level as the "if". The warning is misleading but is very noisy so it makes sense to fix it. (cherry picked from commit 95d04710c5fb0df5393b5add2c5c2de2412673eb) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* [3.9] bpo-42318: Fix support of non-BMP characters in Tkinter on macOS ↵Serhiy Storchaka2020-12-151-1/+53
| | | | | | (GH-23281). (GH-23784) (cherry picked from commit a26215db11cfcf7b5f55cab9e91396761a0e0bcf)
* Trivial typo fix in _tkinter.c (GH-19622)Andrew York2020-05-151-7/+7
| | | Change spelling of a #define in _tkinter.c from HAVE_LIBTOMMAMTH to HAVE_LIBTOMMATH, since this is used to keep track of tclTomMath.h, not tclTomMamth.h. No other file seems to refer to this variable.
* bpo-40268: Remove explicit pythread.h includes (#19529)Victor Stinner2020-04-151-2/+0
| | | | Remove explicit pythread.h includes: it is always included by Python.h.
* bpo-39943: Add the const qualifier to pointers on non-mutable PyBytes data. ↵Serhiy Storchaka2020-04-121-2/+2
| | | | (GH-19472)
* bpo-39573: Clean up modules and headers to use Py_IS_TYPE() function (GH-18521)Dong-hee Na2020-02-171-1/+1
|
* bpo-39573: Use Py_TYPE() macro in Modules directory (GH-18393)Victor Stinner2020-02-071-2/+2
| | | Replace direct access to PyObject.ob_type with Py_TYPE().
* bpo-38835: Don't use PyFPE_START_PROTECT and PyFPE_END_PROTECT (GH-17231)Victor Stinner2019-11-201-2/+0
| | | | | The PyFPE_START_PROTECT() and PyFPE_END_PROTECT() macros are empty: they have been doing nothing for the last year (since commit 735ae8d139a673b30b321dc10acfd3d14f0d633b), so stop using them.
* bpo-38823: Clean up refleaks in _tkinter initialization. (GH-17206)Brandt Bucher2019-11-181-0/+2
| | | https://bugs.python.org/issue38823
* bpo-38371: Tkinter: deprecate the split() method. (GH-16584)Serhiy Storchaka2019-10-081-0/+6
|
* bpo-13153: Use OS native encoding for converting between Python and Tcl. ↵Serhiy Storchaka2019-10-041-173/+202
| | | | | | | | | | | | | (GH-16545) On Windows use UTF-16 (or UTF-32 for 32-bit Tcl_UniChar) with the "surrogatepass" error handler for converting to/from Tcl Unicode objects. On Linux use UTF-8 with the "surrogateescape" error handler for converting to/from Tcl String objects. Converting strings from Tcl to Python and back now never fails (except MemoryError).
* bpo-37206: Unrepresentable default values no longer represented as None. ↵Serhiy Storchaka2019-09-141-4/+4
| | | | | | | (GH-13933) In ArgumentClinic, value "NULL" should now be used only for unrepresentable default values (like in the optional third parameter of getattr). "None" should be used if None is accepted as argument and passing None has the same effect as not passing the argument at all.
* bpo-37752: Delete redundant Py_CHARMASK in normalizestring() (GH-15095)Jordon Xu2019-09-101-2/+2
|
* bpo-37194: Add a new public PyObject_CallNoArgs() function (GH-13890)Victor Stinner2019-06-171-1/+1
| | | | | | | | | | | | | | | Add a new public PyObject_CallNoArgs() function to the C API: call a callable Python object without any arguments. It is the most efficient way to call a callback without any argument. On x86-64, for example, PyObject_CallFunctionObjArgs(func, NULL) allocates 960 bytes on the stack per call, whereas PyObject_CallNoArgs(func) only allocates 624 bytes per call. It is excluded from stable ABI 3.8. Replace private _PyObject_CallNoArg() with public PyObject_CallNoArgs() in C extensions: _asyncio, _datetime, _elementtree, _pickle, _tkinter and readline.
* bpo-35810: Incref heap-allocated types in PyObject_Init (GH-11661)Eddie Elizondo2019-03-271-3/+0
| | | | | * Incref heap-allocated types in PyObject_Init * Add documentation and porting notes to What's New
* bpo-33029: Fix signatures of getter and setter functions. (GH-10746)Serhiy Storchaka2018-11-271-2/+2
| | | Fix also return type for few other functions (clear, releasebuffer).
* bpo-34794: Fix a leak in Tkinter. (GH-10025)Serhiy Storchaka2018-10-231-3/+1
| | | Based on the investigation by Xiang Zhang.
* Fix miscellaneous typos (#4275)luzpaz2017-11-051-1/+1
|
* bpo-23699: Use a macro to reduce boilerplate code in rich comparison ↵stratakis2017-11-021-32/+2
| | | | functions (GH-793)
* bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (#3866)Serhiy Storchaka2017-10-031-2/+10
| | | | | when pass a string larger than 2 GiB. Decrease memory requirements for Tcl's bigmem tests.
* bpo-31673: Fixed typo in the name of Tkinter's method adderrorinfo(). (#3864)Serhiy Storchaka2017-10-031-4/+4
|
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-62/+0
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* Use NULL rather than 0. (#778)Serhiy Storchaka2017-03-231-1/+1
| | | | | There was few cases of using literal 0 instead of NULL in the context of pointers. While this was a legitimate C code, using NULL rather than 0 makes the code clearer.
* bpo-24037: Add Argument Clinic converter `bool(accept={int})`. (#485)Serhiy Storchaka2017-03-121-5/+5
|
* bpo-29548: Fix some inefficient call API usage (GH-97)INADA Naoki2017-02-161-7/+4
|
* Added the const qualifier to char* variables that refer to readonly internalSerhiy Storchaka2016-11-201-3/+3
| | | | UTF-8 represenatation of Unicode objects.
* Fixed possible NULL decrefing.Serhiy Storchaka2016-10-281-1/+1
|\
| * Fixed possible NULL decrefing.Serhiy Storchaka2016-10-281-1/+1
| |
* | replace PY_SIZE_MAX with SIZE_MAXBenjamin Peterson2016-09-071-1/+1
| |
* | require a long long data type (closes #27961)Benjamin Peterson2016-09-061-2/+0
| |
* | - Issue #27332: Fixed the type of the first argument of module-level functionsSerhiy Storchaka2016-07-071-8/+8
|\ \ | |/ | | | | generated by Argument Clinic. Patch by Petr Viktorin.
| * Issue #27332: Fixed the type of the first argument of module-level functionsSerhiy Storchaka2016-07-071-8/+8
| | | | | | | | generated by Argument Clinic. Patch by Petr Viktorin.
* | Use macros instead of corresponding functions (they never fail) in _tkinter.c.Serhiy Storchaka2016-06-191-22/+26
| |
* | Issue #23815: Fixed crashes related to directly created instances of types inSerhiy Storchaka2016-05-081-0/+3
|\ \ | |/ | | | | _tkinter and curses.panel modules.
| * Issue #23815: Fixed crashes related to directly created instances of types inSerhiy Storchaka2016-05-081-0/+3
| | | | | | | | _tkinter and curses.panel modules.
* | Got rid of redundand "self" parameter declarations.Serhiy Storchaka2016-05-021-12/+5
| | | | | | | | Argument Clinic is now able to infer all needed information.
* | Issue #25923: Added more const qualifiers to signatures of static and ↵Serhiy Storchaka2015-12-251-4/+4
|/ | | | private functions.
* Issue #20035: Reimplement tkinter._fix module as a C function.Zachary Ware2015-05-221-1/+118
| | | | | The new private C function makes no permanent changes to the environment and is #ifdef'd out on non-Windows platforms.
* Use specialized functions intead of Py_BuildValue() in _tkinter.Serhiy Storchaka2015-05-061-4/+4
|
* Issue #23880: Tkinter's getint() and getdouble() now support Tcl_Obj.Serhiy Storchaka2015-05-061-7/+25
| | | | Tkinter's getdouble() now supports any numbers (in particular int).
* Issue #24001: Argument Clinic converters now use accept={type}Larry Hastings2015-05-041-3/+3
| | | | instead of types={'type'} to specify the types the converter accepts.
* Fix Windows build breakage from checkins on Issues #20148 and #20168.Larry Hastings2015-05-031-38/+33
|
* Issue #20168: Converted the _tkinter module to Argument Clinic.Serhiy Storchaka2015-05-031-246/+417
|
* Issue #16840. Turn off bignum support in tkinter with with Tcl earlier than ↵Serhiy Storchaka2015-04-221-3/+4
|\ | | | | | | | | | | | | 8.5.8 (tclTomMath.h was broken) and non-final Tcl 8.6. Removed TK_VERSION_HEX.
| * Issue #16840. Turn off bignum support in tkinter with with Tcl earlier than ↵Serhiy Storchaka2015-04-221-3/+4
| | | | | | | | | | | | 8.5.8 (tclTomMath.h was broken) and non-final Tcl 8.6.
* | Issue #16840: Turn on support of bignums only in final release of Tcl 8.5.Serhiy Storchaka2015-04-201-1/+1
|\ \ | |/
| * Issue #16840: Turn on support of bignums only in final release of Tcl 8.5.Serhiy Storchaka2015-04-201-1/+1
| |
* | Issue #15133: _tkinter.tkapp.getboolean() now supports Tcl_Obj and alwaysSerhiy Storchaka2015-04-041-9/+14
|\ \ | |/ | | | | | | returns bool. tkinter.BooleanVar now validates input values (accepted bool, int, str, and Tcl_Obj). tkinter.BooleanVar.get() now always returns bool.