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