Skip to content

Commit c0beabc

Browse files
committed
move LINENO define to where it actually belongs
1 parent 55e0043 commit c0beabc

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

Include/node.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ PyAPI_FUNC(void) PyNode_Free(node *n);
2828
#define RCHILD(n, i) (CHILD(n, NCH(n) + i))
2929
#define TYPE(n) ((n)->n_type)
3030
#define STR(n) ((n)->n_str)
31+
#define LINENO(n) ((n)->n_lineno)
3132

3233
/* Assert that the type of a node is what we expect */
3334
#define REQ(n, type) assert(TYPE(n) == (type))

Python/ast.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -521,10 +521,6 @@ static PyObject *parsestr(struct compiling *, const node *n, int *bytesmode);
521521
static PyObject *parsestrplus(struct compiling *, const node *n,
522522
int *bytesmode);
523523

524-
#ifndef LINENO
525-
#define LINENO(n) ((n)->n_lineno)
526-
#endif
527-
528524
#define COMP_GENEXP 0
529525
#define COMP_LISTCOMP 1
530526
#define COMP_SETCOMP 2

0 commit comments

Comments
 (0)