Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(40)

Unified Diff: Python/Python-ast.c

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Python/modsupport.c ('k') | Python/pythonrun.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Python/Python-ast.c Tue Jul 26 09:37:46 2011 +0300
+++ b/Python/Python-ast.c Mon Jul 25 09:47:18 2011 -0400
@@ -1,5 +1,14 @@
/* File automatically generated by Parser/asdl_c.py. */
+
+/*
+ __version__ e0e663132363.
+
+ This module must be committed separately after each AST grammar change;
+ The __version__ number is set to the revision number of the commit
+ containing the grammar change.
+*/
+
#include "Python.h"
#include "Python-ast.h"
@@ -592,23 +601,8 @@
return 0;
}
-static int obj2ast_identifier(PyObject* obj, PyObject** out, PyArena* arena)
-{
- if (!PyUnicode_CheckExact(obj) && obj != Py_None) {
- PyErr_SetString(PyExc_TypeError, "AST identifier must be of type str");
- return 1;
- }
- return obj2ast_object(obj, out, arena);
-}
-
-static int obj2ast_string(PyObject* obj, PyObject** out, PyArena* arena)
-{
- if (!PyUnicode_CheckExact(obj)) {
- PyErr_SetString(PyExc_TypeError, "AST string must be of type str");
- return 1;
- }
- return obj2ast_object(obj, out, arena);
-}
+#define obj2ast_identifier obj2ast_object
+#define obj2ast_string obj2ast_object
static int obj2ast_int(PyObject* obj, int* out, PyArena* arena)
{
@@ -6756,6 +6750,8 @@
NULL;
if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0)
return NULL;
+ if (PyModule_AddStringConstant(m, "__version__", "e0e663132363") < 0)
+ return NULL;
if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return
NULL;
if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0)
« no previous file with comments | « Python/modsupport.c ('k') | Python/pythonrun.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+