blob: f16b47b88b357150359ecc99d20d16fe5aaee812 [file] [log] [blame]
Guido van Rossumd27b4f21997-05-02 04:00:11 +00001#ifndef Py_PYTHON_H
2#define Py_PYTHON_H
Guido van Rossum174f95a1997-05-02 03:55:52 +00003/* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
4
5/***********************************************************
6Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
7The Netherlands.
8
9 All Rights Reserved
10
11Permission to use, copy, modify, and distribute this software and its
12documentation for any purpose and without fee is hereby granted,
13provided that the above copyright notice appear in all copies and that
14both that copyright notice and this permission notice appear in
15supporting documentation, and that the names of Stichting Mathematisch
16Centrum or CWI or Corporation for National Research Initiatives or
17CNRI not be used in advertising or publicity pertaining to
18distribution of the software without specific, written prior
19permission.
20
21While CWI is the initial source for this software, a modified version
22is made available by the Corporation for National Research Initiatives
23(CNRI) at the Internet address ftp://ftp.python.org.
24
25STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
26REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
27MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
28CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
29DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
30PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
31TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
32PERFORMANCE OF THIS SOFTWARE.
33
34******************************************************************/
35
36/* Include nearly all Python header files */
37
38#include "config.h"
39
40/* config.h may or may not define DL_IMPORT */
41#ifndef DL_IMPORT /* declarations for DLL import/export */
42#define DL_IMPORT(RTYPE) RTYPE
43#endif
44
45#ifdef SYMANTEC__CFM68K__
46#define UsingSharedLibs
47#endif
48
Guido van Rossum90ce8481998-05-26 18:38:07 +000049#if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE)
50#define _SGI_MP_SOURCE
51#endif
52
Guido van Rossum174f95a1997-05-02 03:55:52 +000053#include <stdio.h>
54#include <string.h>
55#include <errno.h>
56#ifdef HAVE_STDLIB_H
57#include <stdlib.h>
58#endif
59
60#include "myproto.h"
61
62#ifdef SYMANTEC__CFM68K__
63#pragma lib_export on
64#endif
65
66#include "object.h"
67#include "objimpl.h"
68
69#include "pydebug.h"
70
Guido van Rossum174f95a1997-05-02 03:55:52 +000071#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"
79#include "tupleobject.h"
80#include "listobject.h"
Guido van Rossum2ec90311997-05-13 21:23:32 +000081#include "dictobject.h"
Guido van Rossum174f95a1997-05-02 03:55:52 +000082#include "methodobject.h"
83#include "moduleobject.h"
84#include "funcobject.h"
85#include "classobject.h"
86#include "fileobject.h"
87#include "cobject.h"
88#include "traceback.h"
89#include "sliceobject.h"
90
91#include "pyerrors.h"
92#include "mymalloc.h"
93
Guido van Rossum618af4b1997-07-18 23:59:26 +000094#include "pystate.h"
95
Guido van Rossum174f95a1997-05-02 03:55:52 +000096#include "modsupport.h"
97#include "ceval.h"
98#include "pythonrun.h"
99#include "sysmodule.h"
100#include "intrcheck.h"
101#include "import.h"
Guido van Rossum174f95a1997-05-02 03:55:52 +0000102
Guido van Rossum174f95a1997-05-02 03:55:52 +0000103#include "abstract.h"
104
105#define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a))
106#define PyArg_NoArgs(v) PyArg_Parse(v, "")
107
108/* Convert a possibly signed character to a nonnegative int */
109/* XXX This assumes characters are 8 bits wide */
110#ifdef __CHAR_UNSIGNED__
111#define Py_CHARMASK(c) (c)
112#else
113#define Py_CHARMASK(c) ((c) & 0xff)
114#endif
115
116#include "pyfpe.h"
117
Guido van Rossumb05a5c71997-05-07 17:46:13 +0000118/* These definitions much match corresponding definitions in graminit.h.
119 There's code in compile.c that checks that they are the same. */
120#define Py_single_input 256
121#define Py_file_input 257
122#define Py_eval_input 258
123
Guido van Rossumd27b4f21997-05-02 04:00:11 +0000124#endif /* !Py_PYTHON_H */