summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* Make ob_refcnt and tp_maxalloc (and friends) Py_ssize_t.Martin v. Löwis2006-03-011-4/+4
|
* Move #include to outside "extern C {}", before Tim figures out it'll breakThomas Wouters2006-02-281-2/+3
| | | | VC++.
* Include code.h more sanely.Thomas Wouters2006-02-281-3/+2
|
* No need to export PySTEntry_New, it is only used in symtable.cNeal Norwitz2006-02-281-2/+1
|
* Martin owns PEP 353 and did most of the workNeal Norwitz2006-02-281-1/+1
|
* from __future__ import with_statement addon for 'with', mostly written byThomas Wouters2006-02-285-3/+15
| | | | Neal.
* Remove asdl_seq_APPEND() and simplify asdl seq implementation.Jeremy Hylton2006-02-281-12/+2
| | | | Clarify intended use of set_context() and check errors at all call sites.
* Real arena implementationJeremy Hylton2006-02-281-10/+4
| | | | | Replace the toy arena implementation with a real one, based on allocating 8K chunks of memory by default.
* SF patch #1438387, PEP 328: relative and absolute imports.Thomas Wouters2006-02-285-3/+14
| | | | | | | | | | | | | | | | | | | | | | | - IMPORT_NAME takes an extra argument from the stack: the relativeness of the import. Only passed to __import__ when it's not -1. - __import__() takes an optional 5th argument for the same thing; it __defaults to -1 (old semantics: try relative, then absolute) - 'from . import name' imports name (be it module or regular attribute) from the current module's *package*. Likewise, 'from .module import name' will import name from a sibling to the current module. - Importing from outside a package is not allowed; 'from . import sys' in a toplevel module will not work, nor will 'from .. import sys' in a (single-level) package. - 'from __future__ import absolute_import' will turn on the new semantics for import and from-import: imports will be absolute, except for from-import with dots. Includes tests for regular imports and importhooks, parser changes and a NEWS item, but no compiler-package changes or documentation changes.
* PEP 343 -- the with-statement.Guido van Rossum2006-02-273-49/+58
| | | | | | | | | | | | | This was started by Mike Bland and completed by Guido (with help from Neal). This still needs a __future__ statement added; Thomas is working on Michael's patch for that aspect. There's a small amount of code cleanup and refactoring in ast.c, compile.c and ceval.c (I fixed the lltrace behavior when EXT_POP is used -- however I had to make lltrace a static global).
* Revert backwards-incompatible const changes.Martin v. Löwis2006-02-272-6/+6
|
* PEP 308 implementation, including minor refdocs and some testcases. ItThomas Wouters2006-02-272-41/+52
| | | | | | | | | | | | | | | | | | | | | | | | | breaks the parser module, because it adds the if/else construct as well as two new grammar rules for backward compatibility. If no one else fixes parsermodule, I guess I'll go ahead and fix it later this week. The TeX code was checked with texcheck.py, but not rendered. There is actually a slight incompatibility: >>> (x for x in lambda:0) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: iteration over non-sequence changes into >>> (x for x in lambda: 0) File "<stdin>", line 1 (x for x in lambda: 0) ^ SyntaxError: invalid syntax Since there's no way the former version can be useful, it's probably a bugfix ;)
* Generate code to recursively copy an AST intoMartin v. Löwis2006-02-262-0/+2
| | | | a tree of Python objects. Expose this through compile().
* Per discussion on python-dev, remove CO_GENERATOR_ALLOWED. Leave comment ↵Neal Norwitz2006-02-252-2/+5
| | | | about not removing yet.
* Bug #1086854: Rename PyHeapType members adding ht_ prefix.Georg Brandl2006-02-201-3/+3
|
* Generators have been permanent for a while. This comment is no longer ↵Neal Norwitz2006-02-191-6/+1
| | | | applicable.
* Fix intptr_t fallback for Py_ssize_t.Martin v. Löwis2006-02-181-1/+1
|
* Change _PyObject_GC_Resize to expect Py_ssize_t.Martin v. Löwis2006-02-161-1/+1
|
* Use Py_ssize_t for field sizes and offsets.Martin v. Löwis2006-02-161-3/+3
|
* Allow for ssize_t field offsets.Martin v. Löwis2006-02-161-1/+1
|
* Merge ssize_t branch.Martin v. Löwis2006-02-1520-147/+202
|
* Renamed _length_cue() to __length_hint__(). See:Armin Rigo2006-02-111-5/+10
| | | | http://mail.python.org/pipermail/python-dev/2006-February/060524.html
* Fix PyGC_Collect() to be exported from the built DLL on Windows. (Fix givenBarry Warsaw2006-01-261-1/+1
| | | | by Matt Messier).
* Fix icc warnings: single bit fields should be unsignedNeal Norwitz2006-01-071-7/+7
|
* Drop sys.build_number. Add sys.subversion.Martin v. Löwis2006-01-052-1/+6
|
* const poisoning, spreading to fix new const warningsTim Peters2005-12-241-3/+3
| | | | in _winreg.c.
* Expose Subversion revision number (calculated via "svnversion .") to Python.Barry Warsaw2005-12-181-0/+1
| | | | | | | Add C API function Py_GetBuildNumber(), add it to the interactive prompt banner (i.e. Py_GetBuildInfo()), and add it as the sys.build_number attribute. The build number is a string instead of an int because it may contain a trailing 'M' if there are local modifications.
* Merge from ast-arena. This reduces the code in Python/ast.c by ~300 lines,Neal Norwitz2005-12-177-73/+116
| | | | simplifies a lot of error handling code, and fixes many memory leaks.
* moved magic into structure (mainly to simplify the client code)Fredrik Lundh2005-12-131-3/+5
| | | | added missing API hooks
* renamed dispatch -> capi to match other CAPI implementationsFredrik Lundh2005-12-131-3/+3
| | | | (e.g. cStringIO, ucnhash, etc)
* added cobject-based expat dispatch mechanism to pyexpatFredrik Lundh2005-12-131-0/+45
|
* SF #1373150, diffs in working copy after a buildNeal Norwitz2005-12-111-1/+1
| | | | | | | | Strip off leading dots and slash so the generated files are the same regardless of whether you configure in the checkout directory or build. If anyone configures in a different directory, we might want a cleaner approach using os.path.*(). Hopefully this is good enough.
* Add const to several API functions that take char *.Jeremy Hylton2005-12-107-34/+36
| | | | | | | | | | | | | | | | | | | 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 *.
* Whoops, checkin consistent versions of *all* files to stop pollutingNeal Norwitz2005-11-132-7/+4
| | | | a bunch of names
* Prevent name pollution by making lots of internal functions static.Neal Norwitz2005-11-131-15/+1
|
* _PyUnicode_IsWhitespace(),Tim Peters2005-10-291-2/+2
| | | | | | | | | _PyUnicode_IsLinebreak(): Changed the declarations to match the definitions. Don't know why they differed; MSVC warned about it; don't know why only these two functions use "const". Someone who does may want to do something saner ;-).
* use PyAPI_FUNC instead of DL_IMPORT. are we going to deprecate the old ↵Neal Norwitz2005-10-241-2/+2
| | | | non-Py PREFIXED macros, etc?
* Do not pollute name block_ty, prefix with _Py_Neal Norwitz2005-10-241-3/+3
|
* use PyAPI_FUNC instead of DL_IMPORT. are we going to deprecate the old ↵Neal Norwitz2005-10-231-2/+2
| | | | non-Py PREFIXED macros, etc?
* Fix private name mangling. The symtable also must do mangles so thatNeil Schemenauer2005-10-231-1/+1
| | | | the scope of names can be correctly determined.
* Correct error to PyRun_SimpleString macro introduced in AST merge.Mark Hammond2005-10-231-1/+1
|
* Fix a bunch of imports to use code.h instead of compile.h.Jeremy Hylton2005-10-211-5/+0
| | | | Remove duplicate declarations from compile.h
* Remove INT_MIN that came from the AST merge.Neal Norwitz2005-10-211-1/+0
| | | | | | INT_MIN is used in Python/compile.c, but it was also used in Objects/abstract.c Python/getargs.c. If we need it for compile.c, we can get it from the same place as the other files.
* Use the newer names for APIs after the AST mergeNeal Norwitz2005-10-211-3/+3
|
* Remove dup declarations after AST mergeNeal Norwitz2005-10-211-3/+0
|
* Merge ast-branch to headJeremy Hylton2005-10-209-128/+654
| | | | | | | | | | 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.
* Convert iterator __len__() methods to a private API.Raymond Hettinger2005-09-241-0/+15
|
* - Changes donated by Elemental Security to make it work on AIX 5.3Guido van Rossum2005-09-141-0/+1
| | | | | with IBM's 64-bit compiler (SF patch #1284289). This also closes SF bug #105470: test_pwd fails on 64bit system (Opteron).
* - Changes donated by Elemental Security to make it work on HP-UX 11 onGuido van Rossum2005-09-141-1/+1
| | | | Itanium2 with HP's 64-bit compiler (SF patch #1225212).
* SF bug #1251300: On UCS-4 builds the "unicode-internal" codec will now complainWalter Dörwald2005-08-301-0/+10
| | | | | about illegal code points. The codec now supports PEP 293 style error handlers. (This is a variant of the Nik Haldimann's patch that detects truncated data)