summaryrefslogtreecommitdiffstats
path: root/Objects/frameobject.c
Commit message (Collapse)AuthorAgeFilesLines
* Untabify C files. Will watch buildbots.Antoine Pitrou2010-05-091-731/+731
|
* Fix compilation error with gcc 4.3.2Antoine Pitrou2009-06-011-1/+3
|
* #4547: When debugging a very large function, it was not alwaysAmaury Forgeot d'Arc2009-06-011-2/+2
| | | | possible to update the lineno attribute of the current frame.
* Fix issue #1689458 by teaching frame_setlineno how to jump to the first line ofJeffrey Yasskin2009-05-201-14/+20
| | | | a code object.
* While I was modifying test_trace, it threw an exception when I accidentallyJeffrey Yasskin2009-05-181-1/+2
| | | | | | | made it try to set the line number from the trace callback for a 'call' event. This patch makes the error message a little more helpful in that case, and makes it a little less likely that a future editor will make the same mistake in test_trace.
* Issue 5954, PyFrame_GetLineNumber:Jeffrey Yasskin2009-05-081-13/+13
| | | | | | | | | | | | | | 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.
* try to initalize all builtin types with PyType_Ready to avoid problems like ↵Benjamin Peterson2009-04-181-8/+0
| | | | #5787
* fix strange errors when setting attributes on tracebacks #4034Benjamin Peterson2009-03-181-1/+11
|
* add py3k warnings to frame.f_exc_*Benjamin Peterson2008-12-221-3/+35
|
* Fixed a comment to C89 style as of ↵Christian Heimes2008-10-021-1/+1
| | | | http://drj11.wordpress.com/2008/10/02/python-and-bragging-about-c89/
* Issue2378: pdb would delete free variables when stepping into a class statement.Amaury Forgeot d'Arc2008-07-211-3/+6
| | | | | The problem was introduced by r53954, the correction is to restore the symmetry between PyFrame_FastToLocals and PyFrame_LocalsToFast
* Added additional __sizeof__ implementations and addressed comments made inRobert Schuppenies2008-07-101-1/+24
| | | | Issue3122.
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-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.
* Renamed PyString to PyBytesChristian Heimes2008-05-261-5/+5
|
* Implemented Martin's suggestion to clear the free lists during the garbage ↵Christian Heimes2008-02-141-3/+11
| | | | collection of the highest generation.
* Unified naming convention for free lists and their limits. All free listsChristian Heimes2008-02-061-3/+4
| | | | | | | | in Object/ are named ``free_list``, the counter ``numfree`` and the upper limit is a macro ``PyName_MAXFREELIST`` inside an #ifndef block. The chances should make it easier to adjust Python for platforms with less memory, e.g. mobile phones.
* #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and ↵Christian Heimes2007-12-191-1/+1
| | | | Py_REFCNT. Macros for b/w compatibility are available.
* PEP 3123: Provide forward compatibility with Python 3.0, while keepingMartin v. Löwis2007-07-211-3/+2
| | | | | backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
* Silence a compiler warning about incompatible pointer types.Brett Cannon2007-04-191-1/+1
|
* Fix a bug when using the __lltrace__ opcode tracer, and a problem sith ↵Kristján Valur Jónsson2007-04-131-2/+2
| | | | signed chars in frameobject.c which can occur with opcodes > 127
* tabifyJeremy Hylton2007-02-271-97/+97
|
* Fix assertion.Jeremy Hylton2007-02-261-2/+2
|
* Do not copy free variables to locals in class namespaces.Jeremy Hylton2007-02-261-19/+75
| | | | | | | | | Fixes bug 1569356, but at the cost of a minor incompatibility in locals(). Add test that verifies that the class namespace is not polluted. Also clarify the behavior in the library docs. Along the way, cleaned up the dict_to_map and map_to_dict implementations and added some comments that explain what they do.
* Move the initialization of some pointers earlier. The problem isNeal Norwitz2006-07-211-1/+1
| | | | | that if we call Py_DECREF(frame) like we do if allocating locals fails, frame_dealloc() will try to use these bogus values and crash.
* Get rid of f_restricted too. Doc the other 4 ints that were already removedNeal Norwitz2006-06-121-2/+7
| | | | at the NeedForSpeed sprint.
* f_code can't be NULL based on Frame_New and other code that derefs it.Neal Norwitz2006-06-111-2/+2
| | | | So there doesn't seem to be much point to checking here.
* fix broken mergeRichard Jones2006-05-231-7/+2
|
* Applied patch 1337051 by Neal Norwitz, saving 4 ints on frame objects.Richard Jones2006-05-231-34/+32
|
* Merge from rjones-funccall branch.Richard Jones2006-05-231-62/+97
| | | | | | Applied patch zombie-frames-2.diff from sf patch 876206 with updates for Python 2.5 and also modified to retain the free_list to avoid the 67% slow-down in pybench recursion test. 5% speed up in function call pybench.
* frame_clear(): Explain why it's important to make the frameTim Peters2006-04-151-18/+11
| | | | | look dead right at the start. Use Py_CLEAR for four more frame members.
* frame_traverse(): Use the standard Py_VISIT macro.Tim Peters2006-04-151-16/+14
| | | | | | | Py_VISIT: cast the `op` argument to PyObject* when calling `visit()`. Else the caller has to pay too much attention to this silly detail (e.g., frame_traverse needs to traverse `struct _frame *` and `PyCodeObject *` pointers too).
* Trimmed trailing whitespace.Tim Peters2006-04-151-13/+12
|
* Fix SF#1470508: crash in generator cycle finalization. There were twoPhillip J. Eby2006-04-151-9/+11
| | | | | | | | | | | problems: first, PyGen_NeedsFinalizing() had an off-by-one bug that prevented it from ever saying a generator didn't need finalizing, and second, frame objects cleared themselves in a way that caused their owning generator to think they were still executable, causing a double deallocation of objects on the value stack if there was still a loop on the block stack. This revision also removes some unnecessary close() operations from test_generators that are now appropriately handled by the cycle collector.
* Use macro versions instead of function versions when we already know the type.Neal Norwitz2006-03-201-2/+2
| | | | | | | | 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.
* Merge ssize_t branch.Martin v. Löwis2006-02-151-11/+11
|
* Fix a bunch of imports to use code.h instead of compile.h.Jeremy Hylton2005-10-211-1/+0
| | | | Remove duplicate declarations from compile.h
* Merge ast-branch to headJeremy Hylton2005-10-201-0/+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.
* SF Bug #215126: Over restricted type checking on eval() functionRaymond Hettinger2004-07-021-6/+9
| | | | | | The builtin eval() function now accepts any mapping for the locals argument. Time sensitive steps guarded by PyDict_CheckExact() to keep from slowing down the normal case. My timings so no measurable impact.
* memset() with small memory sizes just kill us.Armin Rigo2004-03-201-2/+4
|
* Two forgotten Py_DECREF() for two out-of-memory conditions.Armin Rigo2004-01-271-2/+6
|
* Removing bogus Py_DECREF() reported by Armin Rigo (SF bug 812353).Jeremy Hylton2003-10-211-1/+0
| | | | | Even if a new dict is generated for locals, it is stored in f->f_locals.
* Fix indentation.Jeremy Hylton2003-10-211-1/+1
|
* Fix silly typo in comment.Michael W. Hudson2003-08-111-1/+1
|
* Refactor the logic for setting f_builtins.Jeremy Hylton2003-02-051-24/+31
| | | | | | | For the case where the current globals match the previous frame's globals, eliminates three tests in two if statements. For the case where we just get __builtins__ from a module, eliminate a couple of tests.
* Since the *_Init() are private, prefix with _, suggested by SkipNeal Norwitz2002-12-311-1/+1
|
* SF #561244, Micro optimizationsNeal Norwitz2002-12-301-9/+13
| | | | | | Initialize the small integers and __builtins__ in startup. This removes some if conditions. Change XDECREF to DECREF for values which shouldn't be NULL.
* Fix bug introduced by SF patch #643835, Set Next Statement for Python debuggersNeal Norwitz2002-12-191-4/+12
| | | | | | blockstack_top could be 0 when blockstack[blockstack_top-1] was referenced (ie blockstack[-1]) which crashed on hpux. Patch & fix by Richie Hindle
* Undefine MIN and MAX before definingNeal Norwitz2002-12-181-0/+2
| | | | Some systems (HPUX at least) already define MIN/MAX for us
* This is Richie Hindle's patchMichael W. Hudson2002-12-171-1/+259
| | | | | | | | [ 643835 ] Set Next Statement for Python debuggers with a few tweaks by me: adding an unsigned or two, mentioning that not all jumps are allowed in the doc for pdb, adding a NEWS item and a note to whatsnew, and AuCTeX doing something cosmetic to libpdb.tex.
* A slight change to SET_LINENO-less tracing.Michael W. Hudson2002-09-111-2/+36
| | | | | This makes things a touch more like 2.2. Read the comments in Python/ceval.c for more details.