Commit Graph

196 Commits

Author SHA1 Message Date
Antoine Pitrou c7c96a90bc Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines

  Untabify C files. Will watch buildbots.
........
2010-05-09 15:15:40 +00:00
Guilherme Polo c4f54fdfaa Merged revisions 70218-70219 via svnmerge from
svn+ssh://pythondev/python/trunk

........
  r70218 | guilherme.polo | 2009-03-06 22:19:12 -0300 (Fri, 06 Mar 2009) | 1 line

  Fixed issue #5193: Guarantee that Tkinter.Text.search returns a string.
........
  r70219 | guilherme.polo | 2009-03-06 22:47:49 -0300 (Fri, 06 Mar 2009) | 4 lines

  Fixed issue #4792: Prevent a segfault in _tkinter by using the
  guaranteed to be safe interp argument given to the PythonCmd in place
  of the Tcl interpreter taken from a PythonCmd_ClientData.
........
2009-03-07 01:51:48 +00:00
Guilherme Polo c8a20daa12 Merged revisions 69376 via svnmerge from
svn+ssh://pythondev/python/trunk

........
  r69376 | guilherme.polo | 2009-02-06 20:26:22 -0200 (Fri, 06 Feb 2009) | 3 lines

  Partial fix to issue #1731706: memory leak in Tkapp_Call when calling
  from a thread different than the one that created the Tcl interpreter.
........
2009-02-06 22:52:31 +00:00
Guilherme Polo b2dbd4309a Merged revisions 69217,69219 via svnmerge from
svn+ssh://pythondev/python/trunk

........
  r69217 | guilherme.polo | 2009-02-02 19:08:32 -0200 (Mon, 02 Feb 2009) | 1 line

  Fix for issue #1581476
........
  r69219 | guilherme.polo | 2009-02-02 19:14:14 -0200 (Mon, 02 Feb 2009) | 1 line

  NEWS entry for issue #1581476
........
2009-02-02 21:15:41 +00:00
Martin v. Löwis 111c180674 Make more symbols static. 2008-06-13 07:47:47 +00:00
Gregory P. Smith dd96db63f6 This reverts r63675 based on the discussion in this thread:
http://mail.python.org/pipermail/python-dev/2008-June/079988.html

Python 2.6 should stick with PyString_* in its codebase.  The PyBytes_* names
in the spirit of 3.0 are available via a #define only.  See the email thread.
2008-06-09 04:58:54 +00:00
Christian Heimes 593daf545b Renamed PyString to PyBytes 2008-05-26 12:51:38 +00:00
Guido van Rossum 076d9eef7b Bug #1301: fixed a bad assert in _tkinter. 2008-01-03 23:54:04 +00:00
Martin v. Löwis 17cb5cf403 Return results from Python callbacks to Tcl as Tcl objects.
Fixes Tk issue #1851526
2008-01-01 21:05:17 +00:00
Christian Heimes e93237dfcc #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available. 2007-12-19 02:37:44 +00:00
Guido van Rossum b5e81aa53e Backport r56875 from py3k; double LEAVE_PYTHON when AsString() fails
in PythonCmd().
2007-08-09 21:47:11 +00:00
Martin v. Löwis 6819210b9e PEP 3123: Provide forward compatibility with Python 3.0, while keeping
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
2007-07-21 06:55:02 +00:00
Kurt B. Kaiser d67a3b9503 Many calls to tk.call involve an arglist containing a single tuple.
Calls using METH_OLDARGS unpack this tuple; calls using METH_VARARG
don't.  Tcl's concatenation of args was affected; IDLE doesn't start.

Modify Tkapp_Call() to unpack single tuple arglists.

Bug 1733943
Ref http://mail.python.org/pipermail/python-checkins/2007-May/060454.html
2007-07-05 22:03:39 +00:00
Neal Norwitz e2e447b6fb Stop using METH_OLDARGS 2007-05-22 07:16:10 +00:00
Neal Norwitz 5f17d9a1df Don't deref v if it's NULL.
Klocwork #214
2006-08-12 02:33:36 +00:00
Neal Norwitz ce5b3c3188 self is dereffed (and passed as first arg), so it's known to be good.
func is returned from PyArg_ParseTuple and also dereffed.

Reported by Klocwork, #30 (self one at least).
2006-07-16 02:02:57 +00:00
Neal Norwitz 047f3c7ffa Fix some Py_ssize_t issues 2006-06-12 02:06:42 +00:00
Andrew M. Kuchling 36f6d77931 [Bug #1497414] _self is a reserved word in the WATCOM 10.6 C compiler.
Fix by renaming the variable.

In a different module, Neal fixed it by renaming _self to self.  There's
already a variable named 'self' here, so I used selfptr.

(I'm committing this on a Mac without Tk, but it's a simple search-and-replace.
<crosses fingers>, so  I'll watch the buildbots and see what happens.)
2006-06-03 19:02:35 +00:00
Martin v. Löwis 8672519ac0 Work around deadlock risk. Will backport. 2006-05-01 06:28:01 +00:00
Neal Norwitz 65c05b20e9 Get rid of warnings about using chars as subscripts
on Alpha (and possibly other platforms) by using Py_CHARMASK().
2006-04-10 02:17:47 +00:00
Thomas Wouters a74a84d4cb Coverity found refleak: need to free 'v' after calling Tkinter_Error().
Will backport to release24.
2006-03-07 14:04:31 +00:00
Martin v. Löwis 1d519e4625 unconst. 2006-02-27 23:10:11 +00:00
Neal Norwitz 1ac754fa10 Check return result from Py_InitModule*(). This API can fail.
Probably should be backported.
2006-01-19 06:09:39 +00:00
Neal Norwitz d948a43df8 Fix icc warnings: try to set TCL_UNIX_FD for #if TCL_WIN_SOCKET == TCL_UNIX_FD. res is not used, add a XXX comment 2006-01-08 01:08:55 +00:00
Neal Norwitz 9dbc7dd6f2 Remove extra parens 2005-12-19 06:08:59 +00:00
Neal Norwitz 30b5c5d011 Fix SF bug #1072182, problems with signed characters.
Most of these can be backported.
2005-12-19 06:05:18 +00:00
Jeremy Hylton af68c874a6 Add const to several API functions that take char *.
In C++, it's an error to pass a string literal to a char* function
without a const_cast().  Rather than require every C++ extension
module to put a cast around string literals, fix the API to state the
const-ness.

I focused on parts of the API where people usually pass literals:
PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type
slots, etc.  Predictably, there were a large set of functions that
needed to be fixed as a result of these changes.  The most pervasive
change was to make the keyword args list passed to
PyArg_ParseTupleAndKewords() to be a const char *kwlist[].

One cast was required as a result of the changes:  A type object
mallocs the memory for its tp_doc slot and later frees it.
PyTypeObject says that tp_doc is const char *; but if the type was
created by type_new(), we know it is safe to cast to char *.
2005-12-10 18:50:16 +00:00
Martin v. Löwis e2713becd8 Build with --disable-unicode again. Fixes #1158607.
Will backport to 2.4.
2005-03-08 15:03:08 +00:00
Martin v. Löwis fba7369824 Patch #1050475: Fix various x86_64 build issues
regrtest.py: skip rgbimg and imageop as they are not built on 64-bit systems.
_tkinter.c: replace %.8x with %p for printing pointers.
setup.py: add lib64 into the library directories.
2004-11-13 11:13:35 +00:00
Tim Peters 51fa3b740f Tkapp_New(): Rewrite in C so it compiles again. 2004-08-04 02:16:48 +00:00
Martin v. Löwis 1fa649f2d5 Patch #986929: Add support for wish -sync and -use options. 2004-08-03 18:45:31 +00:00
Neal Norwitz 44dbae8cca Remove gcc warning from using "main". Use METH_NOARGS instead of METH_VARARGS 2004-02-19 02:44:22 +00:00
David Ascher e2b4b32025 Implementation of patch 869468
Allow the user to create Tkinter.Tcl objects which are
just like Tkinter.Tk objects except that they do not
initialize Tk. This is useful in circumstances where the
script is being run on machines that do not have an X
server running -- in those cases, Tk initialization fails,
even if no window is ever created.

Includes documentation change and tests.

Tested on Linux, Solaris and Windows.

Reviewed by Martin von Loewis.
2004-02-18 05:59:53 +00:00
Jack Jansen eddc1449ba Getting rid of all the code inside #ifdef macintosh too. 2003-11-20 01:44:59 +00:00
Martin v. Löwis d46e684edd Check for TclError when reading variables. Fixes #807314.
Backported to 2.3.
2003-10-03 17:12:26 +00:00
Martin v. Löwis d6efae500c Properly deal with tuples in Open._fixresult. Fixes bug reported in
follow-up to #621891.
2003-06-14 21:34:32 +00:00
Neal Norwitz d1c5510b99 Fix SF #745055, Memory leak in _tkinter.c/Tkapp_SplitList()
Also fix a memory leak in Tkapp_Split.

This needs to be backported.  I'll leave it up to Barry whether this
is for 2.2.3 or 2.2.4.
2003-05-29 00:17:03 +00:00
Martin v. Löwis 8fd86cc46e Only return objects if wantobjects is set in GetVar. 2003-05-19 19:57:42 +00:00
Martin v. Löwis 28e9ce9df2 Patch #734118: Add {get|set}busywaitinterval. 2003-05-09 08:19:48 +00:00
Martin v. Löwis dd6cd65b98 Implement tcl object __cmp__. 2003-05-03 09:45:12 +00:00
Martin v. Löwis 1869ec5cb7 Convert tcl objects to strings in getvar/setvar. Fixes #730506. 2003-05-01 05:47:00 +00:00
Martin v. Löwis 6f29ff319b Support UCS-4 Tcl for UCS-4 Python builds. Fixes #719880. 2003-04-16 20:34:55 +00:00
Martin v. Löwis ee24e9cad0 Use object interface for global vars. Fixes #721171.
Also move complete processing of get/set/delvar calls to target thread.
2003-04-15 20:33:20 +00:00
Martin v. Löwis a965649386 Wrap thread stuff in WITH_THREAD. Fixes #704641. 2003-03-30 08:44:58 +00:00
Martin v. Löwis 52ae6f67d9 Fake bool API for Python 2.2. 2003-03-30 08:26:04 +00:00
Neal Norwitz 12e2217501 Fix SF #692416, don't crash interpreter for _tkinter.deletefilehandler
in addition to createfilehandler and creaetetimerhandler.
2003-03-03 21:16:39 +00:00
Martin v. Löwis 7f13489bdf Don't crash on _tkinter.createfilehandler in non-threaded Tcl;
disable this function in threaded Tcl. Likewise for creaetetimerhandler.
Fixes #692416.
2003-03-03 10:40:01 +00:00
Neal Norwitz ec74f2fda7 Add more missing PyErr_NoMemory() after failled memory allocs 2003-02-11 23:05:40 +00:00
Martin v. Löwis 70c3dda2fb Convert booleans to integers in IntVar.set. Fixes #671741.
Return booleans from _tkinter.getboolean.
Convert booleans to Tcl booleans in AsObj.
2003-01-22 09:17:38 +00:00
Martin v. Löwis cd9a8b6bcf Avoid usage of PyDoc_STR in 2.2 compatibility code. 2003-01-21 21:52:57 +00:00