Guido van Rossum | d27b4f2 | 1997-05-02 04:00:11 +0000 | [diff] [blame] | 1 | #ifndef Py_PYTHON_H |
| 2 | #define Py_PYTHON_H |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 3 | /* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */ |
| 4 | |
| 5 | /*********************************************************** |
| 6 | Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
| 7 | The Netherlands. |
| 8 | |
| 9 | All Rights Reserved |
| 10 | |
Guido van Rossum | fd71b9e | 2000-06-30 23:50:40 +0000 | [diff] [blame^] | 11 | Copyright (c) 2000, BeOpen.com. |
| 12 | Copyright (c) 1995-2000, Corporation for National Research Initiatives. |
| 13 | Copyright (c) 1990-1995, Stichting Mathematisch Centrum. |
| 14 | All rights reserved. |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 15 | |
Guido van Rossum | fd71b9e | 2000-06-30 23:50:40 +0000 | [diff] [blame^] | 16 | See the file "Misc/COPYRIGHT" for information on usage and |
| 17 | redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 18 | |
| 19 | ******************************************************************/ |
| 20 | |
| 21 | /* Include nearly all Python header files */ |
| 22 | |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 23 | #include "patchlevel.h" |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 24 | #include "config.h" |
| 25 | |
| 26 | /* config.h may or may not define DL_IMPORT */ |
| 27 | #ifndef DL_IMPORT /* declarations for DLL import/export */ |
| 28 | #define DL_IMPORT(RTYPE) RTYPE |
| 29 | #endif |
Guido van Rossum | 43466ec | 1998-12-04 18:48:25 +0000 | [diff] [blame] | 30 | #ifndef DL_EXPORT /* declarations for DLL import/export */ |
| 31 | #define DL_EXPORT(RTYPE) RTYPE |
| 32 | #endif |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 33 | |
| 34 | #ifdef SYMANTEC__CFM68K__ |
| 35 | #define UsingSharedLibs |
| 36 | #endif |
| 37 | |
Guido van Rossum | 90ce848 | 1998-05-26 18:38:07 +0000 | [diff] [blame] | 38 | #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE) |
| 39 | #define _SGI_MP_SOURCE |
| 40 | #endif |
| 41 | |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 42 | #include <stdio.h> |
| 43 | #include <string.h> |
| 44 | #include <errno.h> |
| 45 | #ifdef HAVE_STDLIB_H |
| 46 | #include <stdlib.h> |
| 47 | #endif |
| 48 | |
| 49 | #include "myproto.h" |
| 50 | |
| 51 | #ifdef SYMANTEC__CFM68K__ |
| 52 | #pragma lib_export on |
| 53 | #endif |
| 54 | |
| 55 | #include "object.h" |
| 56 | #include "objimpl.h" |
| 57 | |
| 58 | #include "pydebug.h" |
| 59 | |
Guido van Rossum | 9e896b3 | 2000-04-05 20:11:21 +0000 | [diff] [blame] | 60 | #include "unicodeobject.h" |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 61 | #include "intobject.h" |
| 62 | #include "longobject.h" |
| 63 | #include "floatobject.h" |
| 64 | #ifndef WITHOUT_COMPLEX |
| 65 | #include "complexobject.h" |
| 66 | #endif |
| 67 | #include "rangeobject.h" |
| 68 | #include "stringobject.h" |
Guido van Rossum | 2e19bd7 | 1998-10-07 14:36:10 +0000 | [diff] [blame] | 69 | #include "bufferobject.h" |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 70 | #include "tupleobject.h" |
| 71 | #include "listobject.h" |
Guido van Rossum | 2ec9031 | 1997-05-13 21:23:32 +0000 | [diff] [blame] | 72 | #include "dictobject.h" |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 73 | #include "methodobject.h" |
| 74 | #include "moduleobject.h" |
| 75 | #include "funcobject.h" |
| 76 | #include "classobject.h" |
| 77 | #include "fileobject.h" |
| 78 | #include "cobject.h" |
| 79 | #include "traceback.h" |
| 80 | #include "sliceobject.h" |
| 81 | |
Guido van Rossum | bd7dfbc | 2000-03-10 22:34:00 +0000 | [diff] [blame] | 82 | #include "codecs.h" |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 83 | #include "pyerrors.h" |
| 84 | #include "mymalloc.h" |
| 85 | |
Guido van Rossum | 618af4b | 1997-07-18 23:59:26 +0000 | [diff] [blame] | 86 | #include "pystate.h" |
| 87 | |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 88 | #include "modsupport.h" |
| 89 | #include "ceval.h" |
| 90 | #include "pythonrun.h" |
| 91 | #include "sysmodule.h" |
| 92 | #include "intrcheck.h" |
| 93 | #include "import.h" |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 94 | |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 95 | #include "abstract.h" |
| 96 | |
| 97 | #define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a)) |
| 98 | #define PyArg_NoArgs(v) PyArg_Parse(v, "") |
| 99 | |
| 100 | /* Convert a possibly signed character to a nonnegative int */ |
| 101 | /* XXX This assumes characters are 8 bits wide */ |
| 102 | #ifdef __CHAR_UNSIGNED__ |
| 103 | #define Py_CHARMASK(c) (c) |
| 104 | #else |
| 105 | #define Py_CHARMASK(c) ((c) & 0xff) |
| 106 | #endif |
| 107 | |
| 108 | #include "pyfpe.h" |
| 109 | |
Greg Ward | 9581144 | 2000-05-28 20:29:48 +0000 | [diff] [blame] | 110 | /* These definitions must match corresponding definitions in graminit.h. |
Guido van Rossum | b05a5c7 | 1997-05-07 17:46:13 +0000 | [diff] [blame] | 111 | There's code in compile.c that checks that they are the same. */ |
| 112 | #define Py_single_input 256 |
| 113 | #define Py_file_input 257 |
| 114 | #define Py_eval_input 258 |
| 115 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 116 | #ifdef _GNU_PTH |
| 117 | /* GNU pth user-space thread support */ |
| 118 | #include <pth.h> |
| 119 | #endif |
Guido van Rossum | d27b4f2 | 1997-05-02 04:00:11 +0000 | [diff] [blame] | 120 | #endif /* !Py_PYTHON_H */ |