mirror of
https://github.com/python/cpython.git
synced 2024-12-01 11:15:56 +01:00
53876d9cd8
svn+ssh://pythondev@svn.python.org/python/trunk ........ r62380 | christian.heimes | 2008-04-19 01:13:07 +0200 (Sat, 19 Apr 2008) | 3 lines I finally got the time to update and merge Mark's and my trunk-math branch. The patch is collaborated work of Mark Dickinson and me. It was mostly done a few months ago. The patch fixes a lot of loose ends and edge cases related to operations with NaN, INF, very small values and complex math. The patch also adds acosh, asinh, atanh, log1p and copysign to all platforms. Finally it fixes differences between platforms like different results or exceptions for edge cases. Have fun :) ........ r62382 | christian.heimes | 2008-04-19 01:40:40 +0200 (Sat, 19 Apr 2008) | 2 lines Added new files to Windows project files More Windows related fixes are coming soon ........ r62383 | christian.heimes | 2008-04-19 01:49:11 +0200 (Sat, 19 Apr 2008) | 1 line Stupid me. Py_RETURN_NAN should actually return something ... ........
155 lines
3.4 KiB
C
155 lines
3.4 KiB
C
#ifndef Py_PYTHON_H
|
|
#define Py_PYTHON_H
|
|
/* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
|
|
|
|
/* Include nearly all Python header files */
|
|
|
|
#include "patchlevel.h"
|
|
#include "pyconfig.h"
|
|
|
|
#include <limits.h>
|
|
|
|
#ifndef UCHAR_MAX
|
|
#error "Something's broken. UCHAR_MAX should be defined in limits.h."
|
|
#endif
|
|
|
|
#if UCHAR_MAX != 255
|
|
#error "Python's source code assumes C's unsigned char is an 8-bit type."
|
|
#endif
|
|
|
|
#if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE)
|
|
#define _SGI_MP_SOURCE
|
|
#endif
|
|
|
|
#include <stdio.h>
|
|
#ifndef NULL
|
|
# error "Python.h requires that stdio.h define NULL."
|
|
#endif
|
|
|
|
#include <string.h>
|
|
#ifdef HAVE_ERRNO_H
|
|
#include <errno.h>
|
|
#endif
|
|
#include <stdlib.h>
|
|
#ifdef HAVE_UNISTD_H
|
|
#include <unistd.h>
|
|
#endif
|
|
|
|
/* For uintptr_t, intptr_t */
|
|
#ifdef HAVE_STDDEF_H
|
|
#include <stddef.h>
|
|
#endif
|
|
|
|
/* CAUTION: Build setups should ensure that NDEBUG is defined on the
|
|
* compiler command line when building Python in release mode; else
|
|
* assert() calls won't be removed.
|
|
*/
|
|
#include <assert.h>
|
|
|
|
#include "pyport.h"
|
|
|
|
/* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
|
|
* PYMALLOC_DEBUG is in error if pymalloc is not in use.
|
|
*/
|
|
#if defined(Py_DEBUG) && defined(WITH_PYMALLOC) && !defined(PYMALLOC_DEBUG)
|
|
#define PYMALLOC_DEBUG
|
|
#endif
|
|
#if defined(PYMALLOC_DEBUG) && !defined(WITH_PYMALLOC)
|
|
#error "PYMALLOC_DEBUG requires WITH_PYMALLOC"
|
|
#endif
|
|
#include "pymath.h"
|
|
#include "pymem.h"
|
|
|
|
#include "object.h"
|
|
#include "objimpl.h"
|
|
|
|
#include "pydebug.h"
|
|
|
|
#include "bytesobject.h"
|
|
#include "unicodeobject.h"
|
|
#include "longobject.h"
|
|
#include "longintrepr.h"
|
|
#include "boolobject.h"
|
|
#include "floatobject.h"
|
|
#ifndef WITHOUT_COMPLEX
|
|
#include "complexobject.h"
|
|
#endif
|
|
#include "rangeobject.h"
|
|
#include "stringobject.h"
|
|
#include "memoryobject.h"
|
|
#include "tupleobject.h"
|
|
#include "listobject.h"
|
|
#include "dictobject.h"
|
|
#include "enumobject.h"
|
|
#include "setobject.h"
|
|
#include "methodobject.h"
|
|
#include "moduleobject.h"
|
|
#include "funcobject.h"
|
|
#include "classobject.h"
|
|
#include "fileobject.h"
|
|
#include "cobject.h"
|
|
#include "traceback.h"
|
|
#include "sliceobject.h"
|
|
#include "cellobject.h"
|
|
#include "iterobject.h"
|
|
#include "genobject.h"
|
|
#include "descrobject.h"
|
|
#include "warnings.h"
|
|
#include "weakrefobject.h"
|
|
|
|
#include "codecs.h"
|
|
#include "pyerrors.h"
|
|
|
|
#include "pystate.h"
|
|
|
|
#include "pyarena.h"
|
|
#include "modsupport.h"
|
|
#include "pythonrun.h"
|
|
#include "ceval.h"
|
|
#include "sysmodule.h"
|
|
#include "intrcheck.h"
|
|
#include "import.h"
|
|
|
|
#include "abstract.h"
|
|
|
|
#include "compile.h"
|
|
#include "eval.h"
|
|
|
|
#include "pystrtod.h"
|
|
#include "pystrcmp.h"
|
|
|
|
/* _Py_Mangle is defined in compile.c */
|
|
PyAPI_FUNC(PyObject*) _Py_Mangle(PyObject *p, PyObject *name);
|
|
|
|
/* Convert a possibly signed character to a nonnegative int */
|
|
/* XXX This assumes characters are 8 bits wide */
|
|
#ifdef __CHAR_UNSIGNED__
|
|
#define Py_CHARMASK(c) (c)
|
|
#else
|
|
#define Py_CHARMASK(c) ((unsigned char)((c) & 0xff))
|
|
#endif
|
|
|
|
#include "pyfpe.h"
|
|
|
|
/* These definitions must match corresponding definitions in graminit.h.
|
|
There's code in compile.c that checks that they are the same. */
|
|
#define Py_single_input 256
|
|
#define Py_file_input 257
|
|
#define Py_eval_input 258
|
|
|
|
#ifdef HAVE_PTH
|
|
/* GNU pth user-space thread support */
|
|
#include <pth.h>
|
|
#endif
|
|
|
|
/* Define macros for inline documentation. */
|
|
#define PyDoc_VAR(name) static char name[]
|
|
#define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)
|
|
#ifdef WITH_DOC_STRINGS
|
|
#define PyDoc_STR(str) str
|
|
#else
|
|
#define PyDoc_STR(str) ""
|
|
#endif
|
|
|
|
#endif /* !Py_PYTHON_H */
|