[Python-checkins] cpython: move LINENO define to where it actually belongs

benjamin.peterson python-checkins at python.org
Mon Jan 16 23:31:48 CET 2012


http://hg.python.org/cpython/rev/169fbbac2dec
changeset:   74458:169fbbac2dec
user:        Benjamin Peterson <benjamin at python.org>
date:        Mon Jan 16 17:29:05 2012 -0500
summary:
  move LINENO define to where it actually belongs

files:
  Include/node.h |  1 +
  Python/ast.c   |  4 ----
  2 files changed, 1 insertions(+), 4 deletions(-)


diff --git a/Include/node.h b/Include/node.h
--- a/Include/node.h
+++ b/Include/node.h
@@ -28,6 +28,7 @@
 #define RCHILD(n, i)	(CHILD(n, NCH(n) + i))
 #define TYPE(n)		((n)->n_type)
 #define STR(n)		((n)->n_str)
+#define LINENO(n)       ((n)->n_lineno)
 
 /* Assert that the type of a node is what we expect */
 #define REQ(n, type) assert(TYPE(n) == (type))
diff --git a/Python/ast.c b/Python/ast.c
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -521,10 +521,6 @@
 static PyObject *parsestrplus(struct compiling *, const node *n,
                               int *bytesmode);
 
-#ifndef LINENO
-#define LINENO(n)       ((n)->n_lineno)
-#endif
-
 #define COMP_GENEXP   0
 #define COMP_LISTCOMP 1
 #define COMP_SETCOMP  2

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list