summaryrefslogtreecommitdiffstats
path: root/Python/asdl.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-43244: Remove ast.h, asdl.h, Python-ast.h headers (GH-24933)Victor Stinner2021-03-231-1/+1
| | | | | | | | | | | | | | | | These functions were undocumented and excluded from the limited C API. Most names defined by these header files were not prefixed by "Py" and so could create names conflicts. For example, Python-ast.h defined a "Yield" macro which was conflict with the "Yield" name used by the Windows <winbase.h> header. Use the Python ast module instead. * Move Include/asdl.h to Include/internal/pycore_asdl.h. * Move Include/Python-ast.h to Include/internal/pycore_ast.h. * Remove ast.h header file. * pycore_symtable.h no longer includes Python-ast.h.
* bpo-41746: Add type information to asdl_seq objects (GH-22223)Pablo Galindo2020-09-161-61/+3
| | | | | | | | | | | | | * Add new capability to the PEG parser to type variable assignments. For instance: ``` | a[asdl_stmt_seq*]=';'.small_stmt+ [';'] NEWLINE { a } ``` * Add new sequence types from the asdl definition (automatically generated) * Make `asdl_seq` type a generic aliasing pointer type. * Create a new `asdl_generic_seq` for the generic case using `void*`. * The old `asdl_seq_GET`/`ast_seq_SET` macros now are typed. * New `asdl_seq_GET_UNTYPED`/`ast_seq_SET_UNTYPED` macros for dealing with generic sequences. * Changes all possible `asdl_seq` types to use specific versions everywhere.
* replace PY_SIZE_MAX with SIZE_MAXBenjamin Peterson2016-09-071-4/+4
|
* Issue #22207: Fix "comparison between signed and unsigned integers" warning inVictor Stinner2014-08-171-8/+8
| | | | | test checking for integer overflow on Py_ssize_t type: cast explicitly to size_t.
* Issue #4555: All exported C symbols are now prefixed with either "Py" or "_Py".Antoine Pitrou2013-10-121-2/+2
| | | | ("make smelly" now clean)
* Widen ASDL sequences to Py_ssize_t lengths to better match PEP 353.Martin v. Löwis2012-05-151-2/+2
|
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-44/+44
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* Merged revisions 64114 via svnmerge fromAmaury Forgeot d'Arc2008-06-181-4/+32
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r64114 | gregory.p.smith | 2008-06-11 09:41:16 +0200 (mer., 11 juin 2008) | 6 lines Merge in release25-maint r60793: Added checks for integer overflows, contributed by Google. Some are only available if asserts are left in the code, in cases where they can't be triggered from Python code. ........
* Merge p3yk branch with the trunk up to revision 45595. This breaks a fairThomas Wouters2006-04-211-1/+18
| | | | | | | | | | | | | | | | | | | | number of tests, all because of the codecs/_multibytecodecs issue described here (it's not a Py3K issue, just something Py3K discovers): http://mail.python.org/pipermail/python-dev/2006-April/064051.html Hye-Shik Chang promised to look for a fix, so no need to fix it here. The tests that are expected to break are: test_codecencodings_cn test_codecencodings_hk test_codecencodings_jp test_codecencodings_kr test_codecencodings_tw test_codecs test_multibytecodec This merge fixes an actual test failure (test_weakref) in this branch, though, so I believe merging is the right thing to do anyway.
* Remove asdl_seq_APPEND() and simplify asdl seq implementation.Jeremy Hylton2006-02-281-7/+1
| | | | Clarify intended use of set_context() and check errors at all call sites.
* Merge from ast-arena. This reduces the code in Python/ast.c by ~300 lines,Neal Norwitz2005-12-171-4/+3
| | | | simplifies a lot of error handling code, and fixes many memory leaks.
* Use convenience functionNeal Norwitz2005-11-141-1/+1
|
* Whoops, checkin consistent versions of *all* files to stop pollutingNeal Norwitz2005-11-131-66/+0
| | | | a bunch of names
* Merge ast-branch to headJeremy Hylton2005-10-201-0/+92
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.