summaryrefslogtreecommitdiff
path: root/Python/traceback.c
AgeCommit message (Collapse)AuthorLines
2016-01-04Issue24733 - Remove unreachable code in traceback.cSenthil Kumaran-4/+0
2010-05-09Untabify C files. Will watch buildbots.Antoine Pitrou-212/+212
2010-05-05Remove an unneeded variable assignment.Brett Cannon-1/+0
Found using Clang's static analyzer.
2009-09-09revert unintended changesBenjamin Peterson-86/+8
2009-09-09tabbifyBenjamin Peterson-8/+86
2009-05-08Issue 5954, PyFrame_GetLineNumber:Jeffrey Yasskin-2/+1
Most uses of PyCode_Addr2Line (http://www.google.com/codesearch?q=PyCode_Addr2Line) are just trying to get the line number of a specified frame, but there's no way to do that directly. Forcing people to go through the code object makes them know more about the guts of the interpreter than they should need. The remaining uses of PyCode_Addr2Line seem to be getting the line from a traceback (for example, http://www.google.com/codesearch/p?hl=en#u_9_nDrchrw/pygame-1.7.1release/src/base.c&q=PyCode_Addr2Line), which is replaced by the tb_lineno field. So we may be able to deprecate PyCode_Addr2Line entirely for external use.
2009-03-18fix strange errors when setting attributes on tracebacks #4034Benjamin Peterson-14/+8
2008-07-11#3342: In tracebacks, printed source lines were not indented since r62555.Amaury Forgeot d'Arc-5/+20
#3343: Py_DisplaySourceLine should be a private function. Rename it to _Py_DisplaySourceLine.
2008-06-09This reverts r63675 based on the discussion in this thread:Gregory P. Smith-5/+5
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-05-26Renamed PyString to PyBytesChristian Heimes-5/+5
2008-04-28Fix a bug introduced by the warnings rewrite where tracebacks were beingBrett Cannon-2/+0
improperly indented. Closes issue #2699.
2008-04-12Re-implement the 'warnings' module in C. This allows for usage of theBrett Cannon-22/+38
'warnings' code in places where it was previously not possible (e.g., the parser). It could also potentially lead to a speed-up in interpreter start-up if the C version of the code (_warnings) is imported over the use of the Python version in key places. Closes issue #1631171.
2008-01-18Coverity issue CID #169Christian Heimes-1/+2
local_ptr_assign_local: Assigning address of stack variable "namebuf" to pointer "filename" out_of_scope: Variable "namebuf" goes out of scope use_invalid: Used "filename" pointing to out-of-scope variable "namebuf"
2007-07-21PEP 3123: Provide forward compatibility with Python 3.0, while keepingMartin v. Löwis-2/+1
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
2007-01-23Make PyTraceBack_Here use the current thread, not theMartin v. Löwis-1/+1
frame's thread state. Fixes #1579370. Will backport.
2006-04-15Use Py_VISIT in all tp_traverse methods, instead of traversing manually orThomas Wouters-9/+3
using a custom, nearly-identical macro. This probably changes how some of these functions are compiled, which may result in fractionally slower (or faster) execution. Considering the nature of traversal, visiting much of the address space in unpredictable patterns, I'd argue the code readability and maintainability is well worth it ;P
2006-04-15Use Py_CLEAR instead of in-place DECREF/XDECREF or custom macros, forThomas Wouters-4/+2
tp_clear methods.
2006-03-20Use macro versions instead of function versions when we already know the type.Neal Norwitz-1/+1
This will hopefully get rid of some Coverity warnings, be a hint to developers, and be marginally faster. Some asserts were added when the type is currently known, but depends on values from another function.
2006-03-07SF #1444030: Fix several potential defects found by Coverity.Hye-Shik Chang-1/+5
(reviewed by Neal Norwitz)
2006-02-16Use Py_ssize_t to count theMartin v. Löwis-1/+2
2005-10-20Merge ast-branch to headJeremy Hylton-1/+1
This change implements a new bytecode compiler, based on a transformation of the parse tree to an abstract syntax defined in Parser/Python.asdl. The compiler implementation is not complete, but it is in stable enough shape to run the entire test suite excepting two disabled tests.
2004-03-21Moved tracebackobject to traceback.h, Closes SF Bug #497067Nicholas Bastin-23/+16
2003-11-19Getting rid of support for the ancient Apple MPW compiler.Jack Jansen-5/+0
2003-02-22After the removal of SET_LINENO, PyCode_Addr2Line has always beenMichael W. Hudson-3/+0
called to find tb_lineno -- even if Py_OptimizeFlag is true. So don't call it again when printing the traceback.
2002-08-15This is my patchMichael W. Hudson-6/+5
[ 587993 ] SET_LINENO killer Remove SET_LINENO. Tracing is now supported by inspecting co_lnotab. Many sundry changes to document and adapt to this change.
2002-04-14Mass checkin of universal newline support.Jack Jansen-3/+3
Highlights: import and friends will understand any of \r, \n and \r\n as end of line. Python file input will do the same if you use mode 'U'. Everything can be disabled by configuring with --without-universal-newlines. See PEP278 for details.
2002-03-29Call PyObject_GC_UnTrack before putting an object on the list of trash.Neil Schemenauer-2/+2
2001-11-28Use PyOS_snprintf instead of sprintf.Jeremy Hylton-1/+1
2001-11-27SF bug 485175: buffer overflow in traceback.c.Tim Peters-3/+3
Bugfix candidate. tb_displayline(): the sprintf format was choking off the file name, but used plain %s for the function name (which can be arbitrarily long). Limit both to 500 chars max.
2001-10-22Make traceback objects collectable.Jeremy Hylton-2/+46
This should eliminate the traceback returned by sys.exc_info() as a common source of memory leaks.
2001-10-22Removed two pointless and obfuscating macros.Tim Peters-7/+4
2000-09-01REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum-9/+0
This should match the situation in the 1.6b1 tree.
2000-07-22Mass ANSIfication of function definitions. Doesn't cover all 'extern'Thomas Wouters-23/+8
declarations yet, those come later.
2000-06-30Change copyright notice - 2nd try.Guido van Rossum-6/+0
2000-06-30Change copyright notice.Guido van Rossum-21/+6
2000-06-28Trent Mick's Win64 changes: size_t vs. int or long; also some overflowGuido van Rossum-3/+3
tests.
2000-05-03Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum-1/+1
For more comments, read the patches@python.org archives. For documentation read the comments in mymalloc.h and objimpl.h. (This is not exactly what Vladimir posted to the patches list; I've made a few changes, and Vladimir sent me a fix in private email for a problem that only occurs in debug mode. I'm also holding back on his change to main.c, which seems unnecessary to me.)
2000-03-31Change traceback error message to "most recent call last" fromGuido van Rossum-1/+1
"innermost last". The latter was mysterious to newbies.
2000-03-13Christian Tismer's "trashcan" patch:Guido van Rossum-0/+2
Added wrapping macros to dictobject.c, listobject.c, tupleobject.c, frameobject.c, traceback.c that safely prevends core dumps on stack overflow. Macros and functions in object.c, object.h. The method is an "elevator destructor" that turns cascading deletes into tail recursive behavior when some limit is hit.
1999-09-18Tim Peters fixed PR#75: very long lines cause incorrect tracebacks.Guido van Rossum-2/+11
1997-05-22PyFile_WriteString now returns an error indicator instead of callingGuido van Rossum-14/+30
PyErr_Clear(). Add checking of those errors.
1997-05-05Massive changes for separate thread state management.Guido van Rossum-30/+6
All per-thread globals are moved into a struct which is manipulated separately.
1997-05-05Only use PyCode_Addr2Line to get tb_lineno when Py_OptimizeFlag is set.Guido van Rossum-2/+3
1997-04-29Quickly renamed.Guido van Rossum-57/+57
1997-04-11Keep gcc -Wall and Microsoft VC happy.Guido van Rossum-1/+1
1997-01-24Get the line number from PyCode_Addr2Line instead of believingGuido van Rossum-1/+4
tb_lineno. Store it in tb_lineno for the user.
1996-10-25New permission notice, includes CNRI.Guido van Rossum-12/+19
1995-09-18spell TraceBack with capital BGuido van Rossum-2/+2
1995-07-18keyword arguments and faster callsGuido van Rossum-3/+4
1995-07-07ignore control-l (parallelling change to tokenizer.c)Guido van Rossum-1/+1