| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
PyObject_CallMethod aware of PY_SSIZE_T_CLEAN.
|
|
|
|
|
|
|
|
| |
passing a string. Martin already fixed the actual crash by ensuring
Py_UNICODE is unsigned. As discussed on python-dev, this fix
removes the possibility of creating a unicode string from a raw buffer.
There is an outstanding question of how to fix the crash in 2.4.
|
| |
|
|
|
|
| |
64-bit machines that require pointers to be aligned (e.g. IA64)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
using a C++ compiler. Still lots and lots of errors in the modules built by
setup.py, and a bunch of warnings from g++ in the core.
|
| |
|
|
|
|
| |
in dicts and sets when computing the total number of references.
|
| |
|
|
|
|
| |
compile.c to add a cast.
|
|
|
|
|
| |
still has errors from the casts of asdl_seq_GET to cmpop_ty, but
otherwise it's C++ clean.
|
|
|
|
| |
for the bogus failure.
|
| |
|
|
|
|
|
| |
entirely happy with the two new VISIT macros in compile.c, but I
couldn't see a better approach.
|
|
|
|
|
| |
void* to their respective _ty types. Fix signature of
ast_for_exprlist.
|
| |
|
|
|
|
| |
Explicitly cast void* to int to cmpop_ty.
|
|
|
|
| |
in Python/Python-ast.c. Not sure what to do about those.
|
|
|
|
|
|
|
|
| |
that are suspended outside of any try/except/finally blocks to be
garbage collected even if they are part of a cycle. Generators that
suspend inside of an active try/except or try/finally block (including
those created by a ``with`` statement) are still not GC-able if they
are part of a cycle, however.
|
| |
|
| |
|
| |
|
|
|
|
| |
test_builtin.)
|
| |
|
|
|
|
| |
Re-enable all the tests in test_trace.py except one. Still not sure that these tests test what they used to test, but they pass. One failing test seems to be caused by undocumented line number table behavior in Python 2.4.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tracing/line number table in except blocks.
Reflow long lines introduced by col_offset changes. Update test_ast
to handle new fields in excepthandler.
As note in Python.asdl says, we might want to rethink how attributes
are handled. Perhaps they should be the same as other fields, with
the primary difference being how they are defined for all types within
a sum.
Also fix asdl_c so that constructors with int fields don't fail when
passed a zero value.
|
| |
|
| |
|
|
|
|
|
|
| |
* Cleanup formatting a bit (add spaces).
* Move static var initialized inside init_types() since that's the only place
it's used.
|
|
|
|
| |
param from PEP 328.
|
|
|
|
| |
Reorder compiler_set_lineno() call for consistency.
|
| |
|
|
|
|
|
|
| |
Explicitly clear all elements from arena->a_objects and remove
assert() that refcount is 1. It's possible for a program to get a
reference to the list via sys.getobjects() or via gc functions.
|
|
|
|
|
| |
interpolate PY_FORMAT_SIZE_T instead of #if'ing on
MS_WIN64.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
def foo((x)): was getting recognized as requiring tuple unpacking
which is not correct.
Add tests for this case and the proper way to unpack a tuple of one:
def foo((x,)):
test_inpsect was incorrect before. I'm not sure why it was passing,
but that has been corrected with a test for both functions above.
This means the test (and therefore inspect.getargspec()) are broken in 2.4.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
objimpl.h, pymem.h: Stop mapping PyMem_{Del, DEL} and PyMem_{Free, FREE}
to PyObject_{Free, FREE} in a release build. They're aliases for the
system free() now.
_subprocess.c/sp_handle_dealloc(): Since the memory was originally
obtained via PyObject_NEW, it must be released via PyObject_FREE (or
_DEL).
pythonrun.c, tokenizer.c, parsermodule.c: I lost count of the number of
PyObject vs PyMem mismatches in these -- it's like the specific
function called at each site was picked at random, sometimes even with
memory obtained via PyMem getting released via PyObject. Changed most
to use PyObject uniformly, since the blobs allocated are predictably
small in most cases, and obmalloc is generally faster than system
mallocs then.
If extension modules in real life prove as sloppy as Python's front
end, we'll have to revert the objimpl.h + pymem.h part of this patch.
Note that no problems will show up in a debug build (all calls still go
thru obmalloc then). Problems will show up only in a release build, most
likely segfaults.
|
| |
|
|
|
|
|
| |
and later versions because they bumped the default setting to
get our basic tests to run correctly..
|
| |
|
|
|
|
|
| |
Fix crash when a Unicode string containing an encoding declaration is
compile()d. Fixes #1115379.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|