blob: 044ad5f521cb110abb65b3bb9adf44b0aa9f0c9f [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
Guido van Rossumf1176c41999-01-03 12:40:24 +000038#include "patchlevel.h"
Guido van Rossum174f95a1997-05-02 03:55:52 +000039#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 Rossum43466ec1998-12-04 18:48:25 +000045#ifndef DL_EXPORT /* declarations for DLL import/export */
46#define DL_EXPORT(RTYPE) RTYPE
47#endif
Guido van Rossum174f95a1997-05-02 03:55:52 +000048
49#ifdef SYMANTEC__CFM68K__
50#define UsingSharedLibs
51#endif
52
Guido van Rossum90ce8481998-05-26 18:38:07 +000053#if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE)
54#define _SGI_MP_SOURCE
55#endif
56
Guido van Rossum174f95a1997-05-02 03:55:52 +000057#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 Rossum9e896b32000-04-05 20:11:21 +000075#include "unicodeobject.h"
Guido van Rossum174f95a1997-05-02 03:55:52 +000076#include "intobject.h"
77#include "longobject.h"
78#include "floatobject.h"
79#ifndef WITHOUT_COMPLEX
80#include "complexobject.h"
81#endif
82#include "rangeobject.h"
83#include "stringobject.h"
Guido van Rossum2e19bd71998-10-07 14:36:10 +000084#include "bufferobject.h"
Guido van Rossum174f95a1997-05-02 03:55:52 +000085#include "tupleobject.h"
86#include "listobject.h"
Guido van Rossum2ec90311997-05-13 21:23:32 +000087#include "dictobject.h"
Guido van Rossum174f95a1997-05-02 03:55:52 +000088#include "methodobject.h"
89#include "moduleobject.h"
90#include "funcobject.h"
91#include "classobject.h"
92#include "fileobject.h"
93#include "cobject.h"
94#include "traceback.h"
95#include "sliceobject.h"
96
Guido van Rossumbd7dfbc2000-03-10 22:34:00 +000097#include "codecs.h"
Guido van Rossum174f95a1997-05-02 03:55:52 +000098#include "pyerrors.h"
99#include "mymalloc.h"
100
Guido van Rossum618af4b1997-07-18 23:59:26 +0000101#include "pystate.h"
102
Guido van Rossum174f95a1997-05-02 03:55:52 +0000103#include "modsupport.h"
104#include "ceval.h"
105#include "pythonrun.h"
106#include "sysmodule.h"
107#include "intrcheck.h"
108#include "import.h"
Guido van Rossum174f95a1997-05-02 03:55:52 +0000109
Guido van Rossum174f95a1997-05-02 03:55:52 +0000110#include "abstract.h"
111
112#define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a))
113#define PyArg_NoArgs(v) PyArg_Parse(v, "")
114
115/* Convert a possibly signed character to a nonnegative int */
116/* XXX This assumes characters are 8 bits wide */
117#ifdef __CHAR_UNSIGNED__
118#define Py_CHARMASK(c) (c)
119#else
120#define Py_CHARMASK(c) ((c) & 0xff)
121#endif
122
123#include "pyfpe.h"
124
Guido van Rossumb05a5c71997-05-07 17:46:13 +0000125/* These definitions much match corresponding definitions in graminit.h.
126 There's code in compile.c that checks that they are the same. */
127#define Py_single_input 256
128#define Py_file_input 257
129#define Py_eval_input 258
130
Guido van Rossumd27b4f21997-05-02 04:00:11 +0000131#endif /* !Py_PYTHON_H */