Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0e9e98e

Browse files
committed
c89 declarations
1 parent 5b06681 commit 0e9e98e

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

Parser/asdl_c.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,9 @@ def funcHeader(self, name):
366366
self.emit("obj2ast_%s(PyObject* obj, %s* out, PyArena* arena)" % (name, ctype), 0)
367367
self.emit("{", 0)
368368
self.emit("PyObject* tmp = NULL;", 1)
369+
self.emit("int isinstance;", 1)
369370
# Prevent compiler warnings about unused variable.
370371
self.emit("tmp = tmp;", 1)
371-
self.emit("int isinstance;", 1)
372372
self.emit("", 0)
373373

374374
def sumTrailer(self, name, add_label=False):

Python/Python-ast.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3375,8 +3375,8 @@ int
33753375
obj2ast_mod(PyObject* obj, mod_ty* out, PyArena* arena)
33763376
{
33773377
PyObject* tmp = NULL;
3378-
tmp = tmp;
33793378
int isinstance;
3379+
tmp = tmp;
33803380

33813381

33823382
if (obj == Py_None) {
@@ -3524,8 +3524,8 @@ int
35243524
obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
35253525
{
35263526
PyObject* tmp = NULL;
3527-
tmp = tmp;
35283527
int isinstance;
3528+
tmp = tmp;
35293529

35303530
int lineno;
35313531
int col_offset;
@@ -4720,8 +4720,8 @@ int
47204720
obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
47214721
{
47224722
PyObject* tmp = NULL;
4723-
tmp = tmp;
47244723
int isinstance;
4724+
tmp = tmp;
47254725

47264726
int lineno;
47274727
int col_offset;
@@ -5836,8 +5836,8 @@ int
58365836
obj2ast_expr_context(PyObject* obj, expr_context_ty* out, PyArena* arena)
58375837
{
58385838
PyObject* tmp = NULL;
5839-
tmp = tmp;
58405839
int isinstance;
5840+
tmp = tmp;
58415841

58425842
isinstance = PyObject_IsInstance(obj, (PyObject *)Load_type);
58435843
if (isinstance == -1) {
@@ -5896,8 +5896,8 @@ int
58965896
obj2ast_slice(PyObject* obj, slice_ty* out, PyArena* arena)
58975897
{
58985898
PyObject* tmp = NULL;
5899-
tmp = tmp;
59005899
int isinstance;
5900+
tmp = tmp;
59015901

59025902

59035903
if (obj == Py_None) {
@@ -6019,8 +6019,8 @@ int
60196019
obj2ast_boolop(PyObject* obj, boolop_ty* out, PyArena* arena)
60206020
{
60216021
PyObject* tmp = NULL;
6022-
tmp = tmp;
60236022
int isinstance;
6023+
tmp = tmp;
60246024

60256025
isinstance = PyObject_IsInstance(obj, (PyObject *)And_type);
60266026
if (isinstance == -1) {
@@ -6047,8 +6047,8 @@ int
60476047
obj2ast_operator(PyObject* obj, operator_ty* out, PyArena* arena)
60486048
{
60496049
PyObject* tmp = NULL;
6050-
tmp = tmp;
60516050
int isinstance;
6051+
tmp = tmp;
60526052

60536053
isinstance = PyObject_IsInstance(obj, (PyObject *)Add_type);
60546054
if (isinstance == -1) {
@@ -6155,8 +6155,8 @@ int
61556155
obj2ast_unaryop(PyObject* obj, unaryop_ty* out, PyArena* arena)
61566156
{
61576157
PyObject* tmp = NULL;
6158-
tmp = tmp;
61596158
int isinstance;
6159+
tmp = tmp;
61606160

61616161
isinstance = PyObject_IsInstance(obj, (PyObject *)Invert_type);
61626162
if (isinstance == -1) {
@@ -6199,8 +6199,8 @@ int
61996199
obj2ast_cmpop(PyObject* obj, cmpop_ty* out, PyArena* arena)
62006200
{
62016201
PyObject* tmp = NULL;
6202-
tmp = tmp;
62036202
int isinstance;
6203+
tmp = tmp;
62046204

62056205
isinstance = PyObject_IsInstance(obj, (PyObject *)Eq_type);
62066206
if (isinstance == -1) {
@@ -6355,8 +6355,8 @@ int
63556355
obj2ast_excepthandler(PyObject* obj, excepthandler_ty* out, PyArena* arena)
63566356
{
63576357
PyObject* tmp = NULL;
6358-
tmp = tmp;
63596358
int isinstance;
6359+
tmp = tmp;
63606360

63616361
int lineno;
63626362
int col_offset;

0 commit comments

Comments
 (0)