Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d574ae00
Commit
d574ae00
authored
Jul 22, 2011
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Plain Diff
merge heads
parents
3156fe8e
3de38561
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Parser/asdl_c.py
Parser/asdl_c.py
+1
-1
Python/Python-ast.c
Python/Python-ast.c
+3
-3
No files found.
Parser/asdl_c.py
View file @
d574ae00
...
...
@@ -802,7 +802,7 @@ static int obj2ast_object(PyObject* obj, PyObject** out, PyArena* arena)
static int obj2ast_identifier(PyObject* obj, PyObject** out, PyArena* arena)
{
if (!PyString_CheckExact(obj)) {
if (!PyString_CheckExact(obj)
&& obj != Py_None
) {
PyErr_Format(PyExc_TypeError,
"AST identifier must be of type str");
return 1;
...
...
Python/Python-ast.c
View file @
d574ae00
...
...
@@ -2,7 +2,7 @@
/*
__version__ .
__version__
82160
.
This module must be committed separately after each AST grammar change;
The __version__ number is set to the revision number of the commit
...
...
@@ -596,7 +596,7 @@ static int obj2ast_object(PyObject* obj, PyObject** out, PyArena* arena)
static
int
obj2ast_identifier
(
PyObject
*
obj
,
PyObject
**
out
,
PyArena
*
arena
)
{
if
(
!
PyString_CheckExact
(
obj
))
{
if
(
!
PyString_CheckExact
(
obj
)
&&
obj
!=
Py_None
)
{
PyErr_Format
(
PyExc_TypeError
,
"AST identifier must be of type str"
);
return
1
;
...
...
@@ -6587,7 +6587,7 @@ init_ast(void)
if
(
PyDict_SetItemString
(
d
,
"AST"
,
(
PyObject
*
)
&
AST_type
)
<
0
)
return
;
if
(
PyModule_AddIntConstant
(
m
,
"PyCF_ONLY_AST"
,
PyCF_ONLY_AST
)
<
0
)
return
;
if
(
PyModule_AddStringConstant
(
m
,
"__version__"
,
""
)
<
0
)
if
(
PyModule_AddStringConstant
(
m
,
"__version__"
,
"
82160
"
)
<
0
)
return
;
if
(
PyDict_SetItemString
(
d
,
"mod"
,
(
PyObject
*
)
mod_type
)
<
0
)
return
;
if
(
PyDict_SetItemString
(
d
,
"Module"
,
(
PyObject
*
)
Module_type
)
<
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment