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 | |
| 11 | Permission to use, copy, modify, and distribute this software and its |
| 12 | documentation for any purpose and without fee is hereby granted, |
| 13 | provided that the above copyright notice appear in all copies and that |
| 14 | both that copyright notice and this permission notice appear in |
| 15 | supporting documentation, and that the names of Stichting Mathematisch |
| 16 | Centrum or CWI or Corporation for National Research Initiatives or |
| 17 | CNRI not be used in advertising or publicity pertaining to |
| 18 | distribution of the software without specific, written prior |
| 19 | permission. |
| 20 | |
| 21 | While CWI is the initial source for this software, a modified version |
| 22 | is made available by the Corporation for National Research Initiatives |
| 23 | (CNRI) at the Internet address ftp://ftp.python.org. |
| 24 | |
| 25 | STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH |
| 26 | REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF |
| 27 | MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH |
| 28 | CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL |
| 29 | DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 30 | PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 31 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 32 | PERFORMANCE OF THIS SOFTWARE. |
| 33 | |
| 34 | ******************************************************************/ |
| 35 | |
| 36 | /* Include nearly all Python header files */ |
| 37 | |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 38 | #include "patchlevel.h" |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 39 | #include "config.h" |
| 40 | |
| 41 | /* config.h may or may not define DL_IMPORT */ |
| 42 | #ifndef DL_IMPORT /* declarations for DLL import/export */ |
| 43 | #define DL_IMPORT(RTYPE) RTYPE |
| 44 | #endif |
Guido van Rossum | 43466ec | 1998-12-04 18:48:25 +0000 | [diff] [blame] | 45 | #ifndef DL_EXPORT /* declarations for DLL import/export */ |
| 46 | #define DL_EXPORT(RTYPE) RTYPE |
| 47 | #endif |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 48 | |
| 49 | #ifdef SYMANTEC__CFM68K__ |
| 50 | #define UsingSharedLibs |
| 51 | #endif |
| 52 | |
Guido van Rossum | 90ce848 | 1998-05-26 18:38:07 +0000 | [diff] [blame] | 53 | #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE) |
| 54 | #define _SGI_MP_SOURCE |
| 55 | #endif |
| 56 | |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 57 | #include <stdio.h> |
| 58 | #include <string.h> |
| 59 | #include <errno.h> |
| 60 | #ifdef HAVE_STDLIB_H |
| 61 | #include <stdlib.h> |
| 62 | #endif |
| 63 | |
| 64 | #include "myproto.h" |
| 65 | |
| 66 | #ifdef SYMANTEC__CFM68K__ |
| 67 | #pragma lib_export on |
| 68 | #endif |
| 69 | |
| 70 | #include "object.h" |
| 71 | #include "objimpl.h" |
| 72 | |
| 73 | #include "pydebug.h" |
| 74 | |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 75 | #include "intobject.h" |
| 76 | #include "longobject.h" |
| 77 | #include "floatobject.h" |
| 78 | #ifndef WITHOUT_COMPLEX |
| 79 | #include "complexobject.h" |
| 80 | #endif |
| 81 | #include "rangeobject.h" |
| 82 | #include "stringobject.h" |
Guido van Rossum | 2e19bd7 | 1998-10-07 14:36:10 +0000 | [diff] [blame] | 83 | #include "bufferobject.h" |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 84 | #include "tupleobject.h" |
| 85 | #include "listobject.h" |
Guido van Rossum | 2ec9031 | 1997-05-13 21:23:32 +0000 | [diff] [blame] | 86 | #include "dictobject.h" |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 87 | #include "methodobject.h" |
| 88 | #include "moduleobject.h" |
| 89 | #include "funcobject.h" |
| 90 | #include "classobject.h" |
| 91 | #include "fileobject.h" |
| 92 | #include "cobject.h" |
| 93 | #include "traceback.h" |
| 94 | #include "sliceobject.h" |
| 95 | |
| 96 | #include "pyerrors.h" |
| 97 | #include "mymalloc.h" |
| 98 | |
Guido van Rossum | 618af4b | 1997-07-18 23:59:26 +0000 | [diff] [blame] | 99 | #include "pystate.h" |
| 100 | |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 101 | #include "modsupport.h" |
| 102 | #include "ceval.h" |
| 103 | #include "pythonrun.h" |
| 104 | #include "sysmodule.h" |
| 105 | #include "intrcheck.h" |
| 106 | #include "import.h" |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 107 | |
Guido van Rossum | 174f95a | 1997-05-02 03:55:52 +0000 | [diff] [blame] | 108 | #include "abstract.h" |
| 109 | |
| 110 | #define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a)) |
| 111 | #define PyArg_NoArgs(v) PyArg_Parse(v, "") |
| 112 | |
| 113 | /* Convert a possibly signed character to a nonnegative int */ |
| 114 | /* XXX This assumes characters are 8 bits wide */ |
| 115 | #ifdef __CHAR_UNSIGNED__ |
| 116 | #define Py_CHARMASK(c) (c) |
| 117 | #else |
| 118 | #define Py_CHARMASK(c) ((c) & 0xff) |
| 119 | #endif |
| 120 | |
| 121 | #include "pyfpe.h" |
| 122 | |
Guido van Rossum | b05a5c7 | 1997-05-07 17:46:13 +0000 | [diff] [blame] | 123 | /* These definitions much match corresponding definitions in graminit.h. |
| 124 | There's code in compile.c that checks that they are the same. */ |
| 125 | #define Py_single_input 256 |
| 126 | #define Py_file_input 257 |
| 127 | #define Py_eval_input 258 |
| 128 | |
Guido van Rossum | d27b4f2 | 1997-05-02 04:00:11 +0000 | [diff] [blame] | 129 | #endif /* !Py_PYTHON_H */ |