summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Make Py_BuildValue, PyObject_CallFunction andMartin v. Löwis2006-04-143-25/+73
| | | | PyObject_CallMethod aware of PY_SSIZE_T_CLEAN.
* SF Bug #1454485, array.array('u') could crash the interpreter whenNeal Norwitz2006-04-141-5/+2
| | | | | | | | 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.
* ALIGNMENT_SHIFT is not usedNeal Norwitz2006-04-141-1/+0
|
* Force 8-alignment of memory blocks, as needed onMartin v. Löwis2006-04-131-1/+8
| | | | 64-bit machines that require pointers to be aligned (e.g. IA64)
* Fix type errors.Martin v. Löwis2006-04-131-2/+2
|
* Introduce asdl_int_seq, to hold cmpop_ty.Martin v. Löwis2006-04-134-18/+27
|
* revert - breaks build of Python/ast.c w/ gccSkip Montanaro2006-04-131-2/+5
|
* Use union to discriminate pointer types from enum/int types.Skip Montanaro2006-04-131-5/+2
|
* Add a test for Py_ssize_t. Correct typo in getargs.c.Georg Brandl2006-04-131-2/+2
|
* Replace INT_MAX with PY_SSIZE_T_MAX.Martin v. Löwis2006-04-133-9/+8
|
* spread the extern "C" { } magic pixie dust around. Python itself builds nowAnthony Baxter2006-04-136-0/+55
| | | | | 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.
* casting nastiness to make C++ compiler happyAnthony Baxter2006-04-131-2/+10
|
* Ignore the references to the dummy objects used as deleted keysArmin Rigo2006-04-122-4/+3
| | | | in dicts and sets when computing the total number of references.
* avoid C++ name mangling for the _Py.*SizeT functionsAnthony Baxter2006-04-121-0/+6
|
* Make symtable.c safe for C++ compilers. Changed macros in the same way asAnthony Baxter2006-04-121-11/+13
| | | | compile.c to add a cast.
* per Jeremy's email, remove the _WITH_CAST versions of macros. g++Anthony Baxter2006-04-121-46/+24
| | | | | still has errors from the casts of asdl_seq_GET to cmpop_ty, but otherwise it's C++ clean.
* Part two of the fix for SF bug #1466641: Regenerate graminit.c and add testThomas Wouters2006-04-121-2/+2
| | | | for the bogus failure.
* Some more changes to make code compile under a C++ compiler.Anthony Baxter2006-04-111-1/+1
|
* more low-hanging fruit to make code compile under a C++ compiler. NotAnthony Baxter2006-04-114-68/+100
| | | | | entirely happy with the two new VISIT macros in compile.c, but I couldn't see a better approach.
* Convert 0 to their respective enum types. ConvertMartin v. Löwis2006-04-111-11/+11
| | | | | void* to their respective _ty types. Fix signature of ast_for_exprlist.
* Regenerate.Martin v. Löwis2006-04-111-2/+0
|
* Make _kind types global for C++ compilation.Martin v. Löwis2006-04-111-1/+1
| | | | Explicitly cast void* to int to cmpop_ty.
* low-hanging fruit in Python/ - g++ still hates all the enum_kind declarationsAnthony Baxter2006-04-114-22/+24
| | | | in Python/Python-ast.c. Not sure what to do about those.
* SF Patch #1463867: Improved generator finalization to allow generatorsPhillip J. Eby2006-04-101-0/+3
| | | | | | | | 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.
* Use PyObject_* allocator since FutureFeatures is smallNeal Norwitz2006-04-102-3/+3
|
* Fix some warnings on HP-UX when using cc/aCCNeal Norwitz2006-04-101-4/+7
|
* Regenerate.Martin v. Löwis2006-04-071-1/+1
|
* Fix refleak in __import__("") (probably the cause of the 2 refleaks inThomas Wouters2006-04-051-0/+2
| | | | test_builtin.)
* Fix __import__("") to raise ValueError rather than return None.Thomas Wouters2006-04-041-1/+10
|
* Generate line number table entries for except handlers.Jeremy Hylton2006-04-041-0/+2
| | | | 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.
* Disable .DLL as an extension for extension modules.Martin v. Löwis2006-04-041-0/+6
|
* Add lineno, col_offset to excephandler to enable future fix forJeremy Hylton2006-04-042-31/+66
| | | | | | | | | | | | | | | 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.
* Bug #1421664: Set sys.stderr.encodingMartin v. Löwis2006-04-032-0/+15
|
* Don't abbreviate ABS, use long name ABSOLUTE.Neal Norwitz2006-04-032-4/+4
|
* * Fix a refleak of *_attributes.Neal Norwitz2006-04-031-144/+146
| | | | | | * Cleanup formatting a bit (add spaces). * Move static var initialized inside init_types() since that's the only place it's used.
* Accept keyword arguments for __import__ and doc the addition of the level ↵Neal Norwitz2006-04-031-6/+11
| | | | param from PEP 328.
* Expand comments on line numbers and blocks.Jeremy Hylton2006-04-011-6/+21
| | | | Reorder compiler_set_lineno() call for consistency.
* Patch #1460496: round() now accepts keyword arguments.Georg Brandl2006-03-311-13/+15
|
* Expand comments.Jeremy Hylton2006-03-311-0/+27
| | | | | | 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.
* In format strings slinging Py_ssize_t, unconditionallyTim Peters2006-03-281-9/+6
| | | | | interpolate PY_FORMAT_SIZE_T instead of #if'ing on MS_WIN64.
* answer a question from a commentArmin Rigo2006-03-281-3/+3
|
* Fix SF bug #1458903 with AST compiler.Neal Norwitz2006-03-271-4/+11
| | | | | | | | | | | | 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.
* Years in the making.Tim Peters2006-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Found this in an old email message from Hartmut Goebel.Skip Montanaro2006-03-251-0/+1
|
* Patch #1396919: Reenable the system scope threads on FreeBSD 5.4Hye-Shik Chang2006-03-231-1/+11
| | | | | and later versions because they bumped the default setting to get our basic tests to run correctly..
* Fix a ssize_t issueNeal Norwitz2006-03-231-1/+1
|
* Forward port MvL's fix in 43227:Neal Norwitz2006-03-231-0/+4
| | | | | Fix crash when a Unicode string containing an encoding declaration is compile()d. Fixes #1115379.
* Use macro versions instead of function versions when we already know the type.Neal Norwitz2006-03-202-3/+3
| | | | | | | | 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.
* Release codecs variable earlier.Walter Dörwald2006-03-181-4/+2
|
* Fix some missing checks after PyTuple_New, PyList_New, PyDict_NewGeorg Brandl2006-03-171-1/+3
|