mirror of
https://github.com/python/cpython.git
synced 2024-11-26 11:24:40 +08:00
bbe741dd1b
svn+ssh://pythondev@svn.python.org/python/trunk ........ r61981 | amaury.forgeotdarc | 2008-03-28 01:21:34 +0100 (Fri, 28 Mar 2008) | 2 lines test_future3.py is a regular test file, and should be part of the test suite ........ r61984 | jeffrey.yasskin | 2008-03-28 05:11:18 +0100 (Fri, 28 Mar 2008) | 6 lines Kill a race in test_threading in which the exception info in a thread finishing up after it was joined had a traceback pointing to that thread's (deleted) target attribute, while the test was trying to check that the target was destroyed. Big thanks to Antoine Pitrou for diagnosing the race and pointing out sys.exc_clear() to kill the exception early. This fixes issue 2496. ........ r61985 | neal.norwitz | 2008-03-28 05:41:34 +0100 (Fri, 28 Mar 2008) | 1 line Allow use of other ports so the test can pass if 9091 is in use ........ r61986 | jeffrey.yasskin | 2008-03-28 05:53:10 +0100 (Fri, 28 Mar 2008) | 2 lines Print more information the next time test_socket throws the wrong exception. ........ r61987 | neal.norwitz | 2008-03-28 05:58:51 +0100 (Fri, 28 Mar 2008) | 5 lines Revert r61969 which added casts to Py_CHARMASK to avoid compiler warnings. Rather than sprinkle casts throughout the code, change Py_CHARMASK to always cast it's result to an unsigned char. This should ensure we do the right thing when accessing an array with the result. ........ r61992 | neal.norwitz | 2008-03-28 06:34:59 +0100 (Fri, 28 Mar 2008) | 2 lines Fix compiler warning about finite() missing on Solaris. ........ r61993 | neal.norwitz | 2008-03-28 07:34:03 +0100 (Fri, 28 Mar 2008) | 11 lines Bug 1503: Get the test to pass on OSX. This should make the test more reliable, but I'm not convinced it is the right solution. We need to determine if this causes the test to hang on any platforms or do other bad things. Even if it gets the test to pass reliably, it might be that we want to fix this in socket. The socket returned from accept() is different on different platforms (inheriting attributes or not) and we might want to ensure that the attributes (at least blocking) is the same across all platforms. ........ r61997 | neal.norwitz | 2008-03-28 08:36:31 +0100 (Fri, 28 Mar 2008) | 1 line Name the main method correctly so the test is run ........ r61998 | gregory.p.smith | 2008-03-28 09:00:44 +0100 (Fri, 28 Mar 2008) | 7 lines This patch moves some tests from test_urllib2_net to test_urllib2_localnet. The moved tests use a local server rather than going out to external servers. Accepts patch from issue2429. Contributed by Jerry Seutter & Michael Foord (fuzzyman) at PyCon 2008. ........ r61999 | georg.brandl | 2008-03-28 09:06:56 +0100 (Fri, 28 Mar 2008) | 2 lines #2406: add examples to gzip docs. ........ r62000 | gregory.p.smith | 2008-03-28 09:32:09 +0100 (Fri, 28 Mar 2008) | 4 lines Accept patch issue2426 by Paul Kippes (kippesp). Adds sqlite3.Connection.iterdump to allow dumping of databases. ........
153 lines
3.4 KiB
C
153 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 "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 "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 */
|