summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-03-15 04:58:47 (GMT)
committerGuido van Rossum <guido@python.org>2006-03-15 04:58:47 (GMT)
commit45aecf451a64fb1ebe5e74d0b00965ac8d99dff6 (patch)
treea7edcfb45ceafcffde68a3542aeba67089ea81cb /Include
parentf3175f6341ae207543a0d2d3be36c457349066e6 (diff)
downloadcpython-45aecf451a64fb1ebe5e74d0b00965ac8d99dff6.zip
cpython-45aecf451a64fb1ebe5e74d0b00965ac8d99dff6.tar.gz
cpython-45aecf451a64fb1ebe5e74d0b00965ac8d99dff6.tar.bz2
Checkpoint. 218 tests are okay; 53 are failing. Done so far:
- all classes are new-style (but ripping out classobject.[ch] isn't done) - int/int -> float - all exceptions must derive from BaseException - absolute import - 'as' and 'with' are keywords
Diffstat (limited to 'Include')
-rw-r--r--Include/code.h6
-rw-r--r--Include/parsetok.h2
-rw-r--r--Include/patchlevel.h12
-rw-r--r--Include/pyerrors.h23
-rw-r--r--Include/pythonrun.h5
5 files changed, 19 insertions, 29 deletions
diff --git a/Include/code.h b/Include/code.h
index 9e6cb56..a4509e3 100644
--- a/Include/code.h
+++ b/Include/code.h
@@ -41,17 +41,17 @@ typedef struct {
#define CO_NOFREE 0x0040
#if 0
-/* This is no longer used. Stopped defining in 2.5, do not re-use. */
+/* These are no longer used. */
#define CO_GENERATOR_ALLOWED 0x1000
-#endif
#define CO_FUTURE_DIVISION 0x2000
#define CO_FUTURE_ABSIMPORT 0x4000 /* absolute import by default */
#define CO_FUTURE_WITH_STATEMENT 0x8000
+#endif
/* This should be defined if a future statement modifies the syntax.
For example, when a keyword is added.
*/
-#define PY_PARSER_REQUIRES_FUTURE_KEYWORD
+/* #define PY_PARSER_REQUIRES_FUTURE_KEYWORD */
#define CO_MAXBLOCKS 20 /* Max static block nesting within a function */
diff --git a/Include/parsetok.h b/Include/parsetok.h
index 0f87e81..2b4ce1e 100644
--- a/Include/parsetok.h
+++ b/Include/parsetok.h
@@ -23,7 +23,9 @@ typedef struct {
#define PyPARSE_DONT_IMPLY_DEDENT 0x0002
+#if 0
#define PyPARSE_WITH_IS_KEYWORD 0x0003
+#endif
PyAPI_FUNC(node *) PyParser_ParseString(const char *, grammar *, int,
perrdetail *);
diff --git a/Include/patchlevel.h b/Include/patchlevel.h
index 2904fb6..56cf762 100644
--- a/Include/patchlevel.h
+++ b/Include/patchlevel.h
@@ -1,9 +1,5 @@
-/* Newfangled version identification scheme.
-
- This scheme was added in Python 1.5.2b2; before that time, only PATCHLEVEL
- was available. To test for presence of the scheme, test for
- defined(PY_MAJOR_VERSION).
+/* Python version identification scheme.
When the major or minor version changes, the VERSION variable in
configure.in must also be changed.
@@ -19,14 +15,14 @@
/* Higher for patch releases */
/* Version parsed out into numeric values */
-#define PY_MAJOR_VERSION 2
-#define PY_MINOR_VERSION 5
+#define PY_MAJOR_VERSION 0
+#define PY_MINOR_VERSION 0
#define PY_MICRO_VERSION 0
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA
#define PY_RELEASE_SERIAL 0
/* Version as a string */
-#define PY_VERSION "2.5a0"
+#define PY_VERSION "3.0x"
/* Subversion Revision number of this file (not of the repository) */
#define PY_PATCHLEVEL_REVISION "$Revision$"
diff --git a/Include/pyerrors.h b/Include/pyerrors.h
index 1fe2e45..0e7718c 100644
--- a/Include/pyerrors.h
+++ b/Include/pyerrors.h
@@ -28,25 +28,18 @@ PyAPI_FUNC(void) PyErr_NormalizeException(PyObject**, PyObject**, PyObject**);
/* */
-#define PyExceptionClass_Check(x) \
- (PyClass_Check((x)) \
- || (PyType_Check((x)) && PyType_IsSubtype( \
- (PyTypeObject*)(x), (PyTypeObject*)PyExc_BaseException)))
+#define PyExceptionClass_Check(x) \
+ (PyType_Check((x)) && PyType_IsSubtype( \
+ (PyTypeObject*)(x), (PyTypeObject*)PyExc_BaseException))
-#define PyExceptionInstance_Check(x) \
- (PyInstance_Check((x)) || \
- (PyType_IsSubtype((x)->ob_type, (PyTypeObject*)PyExc_BaseException)))
+#define PyExceptionInstance_Check(x) \
+ (PyType_IsSubtype((x)->ob_type, (PyTypeObject*)PyExc_BaseException))
-#define PyExceptionClass_Name(x) \
- (PyClass_Check((x)) \
- ? PyString_AS_STRING(((PyClassObject*)(x))->cl_name) \
- : (char *)(((PyTypeObject*)(x))->tp_name))
+#define PyExceptionClass_Name(x) \
+ ((char *)(((PyTypeObject*)(x))->tp_name))
-#define PyExceptionInstance_Class(x) \
- ((PyInstance_Check((x)) \
- ? (PyObject*)((PyInstanceObject*)(x))->in_class \
- : (PyObject*)((x)->ob_type)))
+#define PyExceptionInstance_Class(x) ((PyObject*)((x)->ob_type))
/* Predefined exceptions */
diff --git a/Include/pythonrun.h b/Include/pythonrun.h
index 1ecb3d7..52623ba 100644
--- a/Include/pythonrun.h
+++ b/Include/pythonrun.h
@@ -7,9 +7,8 @@
extern "C" {
#endif
-#define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSIMPORT | \
- CO_FUTURE_WITH_STATEMENT)
-#define PyCF_MASK_OBSOLETE (CO_NESTED)
+#define PyCF_MASK 0
+#define PyCF_MASK_OBSOLETE 0
#define PyCF_SOURCE_IS_UTF8 0x0100
#define PyCF_DONT_IMPLY_DEDENT 0x0200
#define PyCF_ONLY_AST 0x0400