[Python-checkins] merge in cpython: Merged
martin.v.loewis
python-checkins at python.org
Sat Feb 26 23:20:51 CET 2011
martin.v.loewis pushed cd743c54fa9c to cpython:
http://hg.python.org/cpython/rev/cd743c54fa9c
changeset: 68062:cd743c54fa9c
parent: 68060:879109e477ec
parent: 68061:dbfb2158b657
user: Martin v. L?wis <martin at v.loewis.de>
date: Sat Feb 26 23:16:09 2011 +0100
summary:
Merged
files:
diff --git a/Include/asdl.h b/Include/asdl.h
--- a/Include/asdl.h
+++ b/Include/asdl.h
@@ -1,41 +1,42 @@
-#ifndef Py_ASDL_H
-#define Py_ASDL_H
-
-typedef PyObject * identifier;
-typedef PyObject * string;
-typedef PyObject * object;
-
-/* It would be nice if the code generated by asdl_c.py was completely
- independent of Python, but it is a goal the requires too much work
- at this stage. So, for example, I'll represent identifiers as
- interned Python strings.
-*/
-
-/* XXX A sequence should be typed so that its use can be typechecked. */
-
-typedef struct {
- int size;
- void *elements[1];
-} asdl_seq;
-
-typedef struct {
- int size;
- int elements[1];
-} asdl_int_seq;
-
-asdl_seq *asdl_seq_new(int size, PyArena *arena);
-asdl_int_seq *asdl_int_seq_new(int size, PyArena *arena);
-
-#define asdl_seq_GET(S, I) (S)->elements[(I)]
-#define asdl_seq_LEN(S) ((S) == NULL ? 0 : (S)->size)
-#ifdef Py_DEBUG
-#define asdl_seq_SET(S, I, V) { \
- int _asdl_i = (I); \
- assert((S) && _asdl_i < (S)->size); \
- (S)->elements[_asdl_i] = (V); \
-}
-#else
-#define asdl_seq_SET(S, I, V) (S)->elements[I] = (V)
-#endif
-
-#endif /* !Py_ASDL_H */
+#ifndef Py_ASDL_H
+#define Py_ASDL_H
+
+typedef PyObject * identifier;
+typedef PyObject * string;
+typedef PyObject * object;
+/* Some new comment. What line ending is used? */
+
+/* It would be nice if the code generated by asdl_c.py was completely
+ independent of Python, but it is a goal the requires too much work
+ at this stage. So, for example, I'll represent identifiers as
+ interned Python strings.
+*/
+
+/* XXX A sequence should be typed so that its use can be typechecked. */
+
+typedef struct {
+ int size;
+ void *elements[1];
+} asdl_seq;
+
+typedef struct {
+ int size;
+ int elements[1];
+} asdl_int_seq;
+
+asdl_seq *asdl_seq_new(int size, PyArena *arena);
+asdl_int_seq *asdl_int_seq_new(int size, PyArena *arena);
+
+#define asdl_seq_GET(S, I) (S)->elements[(I)]
+#define asdl_seq_LEN(S) ((S) == NULL ? 0 : (S)->size)
+#ifdef Py_DEBUG
+#define asdl_seq_SET(S, I, V) { \
+ int _asdl_i = (I); \
+ assert((S) && _asdl_i < (S)->size); \
+ (S)->elements[_asdl_i] = (V); \
+}
+#else
+#define asdl_seq_SET(S, I, V) (S)->elements[I] = (V)
+#endif
+
+#endif /* !Py_ASDL_H */
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list