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
c2f665e7
Commit
c2f665e7
authored
Feb 10, 2014
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't put runtime values in array initializer for C89 compliance (closes #20588)
parent
f0560d95
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
Misc/NEWS
Misc/NEWS
+2
-0
Parser/asdl_c.py
Parser/asdl_c.py
+6
-2
Python/Python-ast.c
Python/Python-ast.c
+6
-2
No files found.
Misc/NEWS
View file @
c2f665e7
...
...
@@ -10,6 +10,8 @@ What's New in Python 3.3.5 release candidate 1?
Core and Builtins
-----------------
- Issue #20588: Make Python-ast.c C89 compliant.
- Issue #20437: Fixed 21 potential bugs when deleting objects references.
- Issue #20538: UTF-7 incremental decoder produced inconsistant string when
...
...
Parser/asdl_c.py
View file @
c2f665e7
...
...
@@ -1150,10 +1150,14 @@ PyObject* PyAST_mod2obj(mod_ty t)
mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode)
{
mod_ty res;
PyObject *req_type[] = {(PyObject*)Module_type, (PyObject*)Expression_type,
(PyObject*)Interactive_type};
PyObject *req_type[3];
char *req_name[] = {"Module", "Expression", "Interactive"};
int isinstance;
req_type[0] = (PyObject*)Module_type;
req_type[1] = (PyObject*)Expression_type;
req_type[2] = (PyObject*)Interactive_type;
assert(0 <= mode && mode <= 2);
init_types();
...
...
Python/Python-ast.c
View file @
c2f665e7
...
...
@@ -6957,10 +6957,14 @@ PyObject* PyAST_mod2obj(mod_ty t)
mod_ty
PyAST_obj2mod
(
PyObject
*
ast
,
PyArena
*
arena
,
int
mode
)
{
mod_ty
res
;
PyObject
*
req_type
[]
=
{(
PyObject
*
)
Module_type
,
(
PyObject
*
)
Expression_type
,
(
PyObject
*
)
Interactive_type
};
PyObject
*
req_type
[
3
];
char
*
req_name
[]
=
{
"Module"
,
"Expression"
,
"Interactive"
};
int
isinstance
;
req_type
[
0
]
=
(
PyObject
*
)
Module_type
;
req_type
[
1
]
=
(
PyObject
*
)
Expression_type
;
req_type
[
2
]
=
(
PyObject
*
)
Interactive_type
;
assert
(
0
<=
mode
&&
mode
<=
2
);
init_types
();
...
...
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