summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-09-17 03:24:09 (GMT)
committerGuido van Rossum <guido@python.org>2002-09-17 03:24:09 (GMT)
commit73d66925d90facf9a4a831d8ea5b1ffe6b4653c3 (patch)
tree479ede33a43ecb321115e99ccac75f1c49119088 /Include
parent33931ef1a6d4e665813b81a712f450a0c4b3e010 (diff)
downloadcpython-73d66925d90facf9a4a831d8ea5b1ffe6b4653c3.zip
cpython-73d66925d90facf9a4a831d8ea5b1ffe6b4653c3.tar.gz
cpython-73d66925d90facf9a4a831d8ea5b1ffe6b4653c3.tar.bz2
Rearrange the members of struct _node to put shorter fields towards
the end, in the hope of saving some bytes on 64-bit machines. (Too bad n_nchildren can't be made an unsigned short, but test/test_longexp.py specifically tests for more than 2**16 subtrees at one level.) I don't expect any binary compatibility issues here, unless someone has an old binary of parsermodule.so saved away.
Diffstat (limited to 'Include')
-rw-r--r--Include/node.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Include/node.h b/Include/node.h
index 8f5ef23..c909ec5 100644
--- a/Include/node.h
+++ b/Include/node.h
@@ -8,11 +8,11 @@ extern "C" {
#endif
typedef struct _node {
- short n_type;
char *n_str;
+ struct _node *n_child;
int n_lineno;
int n_nchildren;
- struct _node *n_child;
+ short n_type;
} node;
PyAPI_FUNC(node *) PyNode_New(int type);