annotate Include/Python.h @ 46107:5341b30b1812 legacy-trunk

Merged revisions 61750,61752,61754,61756,61760,61763,61768,61772,61775,61805,61809,61812,61819,61917,61920,61930,61933-61934 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/trunk-bytearray ........ r61750 | christian.heimes | 2008-03-22 20:47:44 +0100 (Sat, 22 Mar 2008) | 1 line Copied files from py3k w/o modifications ........ r61752 | christian.heimes | 2008-03-22 20:53:20 +0100 (Sat, 22 Mar 2008) | 7 lines Take One * Added initialization code, warnings, flags etc. to the appropriate places * Added new buffer interface to string type * Modified tests * Modified Makefile.pre.in to compile the new files * Added bytesobject.c to Python.h ........ r61754 | christian.heimes | 2008-03-22 21:22:19 +0100 (Sat, 22 Mar 2008) | 2 lines Disabled bytearray.extend for now since it causes an infinite recursion Fixed serveral unit tests ........ r61756 | christian.heimes | 2008-03-22 21:43:38 +0100 (Sat, 22 Mar 2008) | 5 lines Added PyBytes support to several places: str + bytearray ord(bytearray) bytearray(str, encoding) ........ r61760 | christian.heimes | 2008-03-22 21:56:32 +0100 (Sat, 22 Mar 2008) | 1 line Fixed more unit tests related to type('') is not unicode ........ r61763 | christian.heimes | 2008-03-22 22:20:28 +0100 (Sat, 22 Mar 2008) | 2 lines Fixed more unit tests Fixed bytearray.extend ........ r61768 | christian.heimes | 2008-03-22 22:40:50 +0100 (Sat, 22 Mar 2008) | 1 line Implemented old buffer interface for bytearray ........ r61772 | christian.heimes | 2008-03-22 23:24:52 +0100 (Sat, 22 Mar 2008) | 1 line Added backport of the io module ........ r61775 | christian.heimes | 2008-03-23 03:50:49 +0100 (Sun, 23 Mar 2008) | 1 line Fix str assignement to bytearray. Assignment of a str of size 1 is interpreted as a single byte ........ r61805 | christian.heimes | 2008-03-23 19:33:48 +0100 (Sun, 23 Mar 2008) | 3 lines Fixed more tests Fixed bytearray() comparsion with unicode() Fixed iterator assignment of bytearray ........ r61809 | christian.heimes | 2008-03-23 21:02:21 +0100 (Sun, 23 Mar 2008) | 2 lines str(bytesarray()) now returns the bytes and not the representation of the bytearray object Enabled and fixed more unit tests ........ r61812 | christian.heimes | 2008-03-23 21:53:08 +0100 (Sun, 23 Mar 2008) | 3 lines Clear error PyNumber_AsSsize_t() fails Use CHARMASK for ob_svall access disabled a test with memoryview again ........ r61819 | christian.heimes | 2008-03-23 23:05:57 +0100 (Sun, 23 Mar 2008) | 1 line Untested updates to the PCBuild directory ........ r61917 | christian.heimes | 2008-03-26 00:57:06 +0100 (Wed, 26 Mar 2008) | 1 line The type system of Python 2.6 has subtle differences to 3.0's. I've removed the Py_TPFLAGS_BASETYPE flags from bytearray for now. bytearray can't be subclasses until the issues with bytearray subclasses are fixed. ........ r61920 | christian.heimes | 2008-03-26 01:44:08 +0100 (Wed, 26 Mar 2008) | 2 lines Disabled last failing test I don't understand what the test is testing and how it suppose to work. Ka-Ping, please check it out. ........ r61930 | christian.heimes | 2008-03-26 12:46:18 +0100 (Wed, 26 Mar 2008) | 1 line Re-enabled bytes warning code ........ r61933 | christian.heimes | 2008-03-26 13:20:46 +0100 (Wed, 26 Mar 2008) | 1 line Fixed a bug in the new buffer protocol. The buffer slots weren't copied into a subclass. ........ r61934 | christian.heimes | 2008-03-26 13:25:09 +0100 (Wed, 26 Mar 2008) | 1 line Re-enabled bytearray subclassing - all tests are passing. ........
author Christian Heimes <christian@cheimes.de>
date Wed, 26 Mar 2008 12:49:49 +0000
parents 5c0b5cabeec9
children 7fdff02e6f45
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5398
72b231edfb25 Several oopsies -- Py_ALLOBJECTS_H -> Py_PYTHON_H, temporarily removed
Guido van Rossum <guido@python.org>
parents: 5397
diff changeset
1 #ifndef Py_PYTHON_H
72b231edfb25 Several oopsies -- Py_ALLOBJECTS_H -> Py_PYTHON_H, temporarily removed
Guido van Rossum <guido@python.org>
parents: 5397
diff changeset
2 #define Py_PYTHON_H
5397
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
3 /* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
4
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
5 /* Include nearly all Python header files */
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
6
9744
85ab28644201 New version identification scheme.
Guido van Rossum <guido@python.org>
parents: 9586
diff changeset
7 #include "patchlevel.h"
18835
2dea40e40d9d Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774.
Martin v. Löwis <martin@v.loewis.de>
parents: 18611
diff changeset
8 #include "pyconfig.h"
5397
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
9
24121
bf3421a28744 Removed WITH_CYCLE_GC #ifdef-ery. Holes:
Tim Peters <tim.peters@gmail.com>
parents: 23950
diff changeset
10 /* Cyclic gc is always enabled, starting with release 2.3a1. Supply the
bf3421a28744 Removed WITH_CYCLE_GC #ifdef-ery. Holes:
Tim Peters <tim.peters@gmail.com>
parents: 23950
diff changeset
11 * old symbol for the benefit of extension modules written before then
bf3421a28744 Removed WITH_CYCLE_GC #ifdef-ery. Holes:
Tim Peters <tim.peters@gmail.com>
parents: 23950
diff changeset
12 * that may be conditionalizing on it. The core doesn't use it anymore.
bf3421a28744 Removed WITH_CYCLE_GC #ifdef-ery. Holes:
Tim Peters <tim.peters@gmail.com>
parents: 23950
diff changeset
13 */
bf3421a28744 Removed WITH_CYCLE_GC #ifdef-ery. Holes:
Tim Peters <tim.peters@gmail.com>
parents: 23950
diff changeset
14 #ifndef WITH_CYCLE_GC
bf3421a28744 Removed WITH_CYCLE_GC #ifdef-ery. Holes:
Tim Peters <tim.peters@gmail.com>
parents: 23950
diff changeset
15 #define WITH_CYCLE_GC 1
bf3421a28744 Removed WITH_CYCLE_GC #ifdef-ery. Holes:
Tim Peters <tim.peters@gmail.com>
parents: 23950
diff changeset
16 #endif
bf3421a28744 Removed WITH_CYCLE_GC #ifdef-ery. Holes:
Tim Peters <tim.peters@gmail.com>
parents: 23950
diff changeset
17
14869
25ddd3dc7a7a Rationalize use of limits.h, moving the inclusion to Python.h.
Fred Drake <fdrake@acm.org>
parents: 14674
diff changeset
18 #include <limits.h>
25ddd3dc7a7a Rationalize use of limits.h, moving the inclusion to Python.h.
Fred Drake <fdrake@acm.org>
parents: 14674
diff changeset
19
31250
dfd0114cf9ec There are places in Python which assume bytes have 8-bits. Formalize that a
Skip Montanaro <skip@pobox.com>
parents: 30929
diff changeset
20 #ifndef UCHAR_MAX
dfd0114cf9ec There are places in Python which assume bytes have 8-bits. Formalize that a
Skip Montanaro <skip@pobox.com>
parents: 30929
diff changeset
21 #error "Something's broken. UCHAR_MAX should be defined in limits.h."
dfd0114cf9ec There are places in Python which assume bytes have 8-bits. Formalize that a
Skip Montanaro <skip@pobox.com>
parents: 30929
diff changeset
22 #endif
dfd0114cf9ec There are places in Python which assume bytes have 8-bits. Formalize that a
Skip Montanaro <skip@pobox.com>
parents: 30929
diff changeset
23
dfd0114cf9ec There are places in Python which assume bytes have 8-bits. Formalize that a
Skip Montanaro <skip@pobox.com>
parents: 30929
diff changeset
24 #if UCHAR_MAX != 255
31251
e118e4e8e224 Changed the UCHAR_MAX error msg a bit: we don't really assume anything
Tim Peters <tim.peters@gmail.com>
parents: 31250
diff changeset
25 #error "Python's source code assumes C's unsigned char is an 8-bit type."
31250
dfd0114cf9ec There are places in Python which assume bytes have 8-bits. Formalize that a
Skip Montanaro <skip@pobox.com>
parents: 30929
diff changeset
26 #endif
dfd0114cf9ec There are places in Python which assume bytes have 8-bits. Formalize that a
Skip Montanaro <skip@pobox.com>
parents: 30929
diff changeset
27
8429
f7c58ed2981d On SGI, we need to define _SGI_MP_SOURCE before including errno.h when
Guido van Rossum <guido@python.org>
parents: 5919
diff changeset
28 #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE)
f7c58ed2981d On SGI, we need to define _SGI_MP_SOURCE before including errno.h when
Guido van Rossum <guido@python.org>
parents: 5919
diff changeset
29 #define _SGI_MP_SOURCE
f7c58ed2981d On SGI, we need to define _SGI_MP_SOURCE before including errno.h when
Guido van Rossum <guido@python.org>
parents: 5919
diff changeset
30 #endif
f7c58ed2981d On SGI, we need to define _SGI_MP_SOURCE before including errno.h when
Guido van Rossum <guido@python.org>
parents: 5919
diff changeset
31
5397
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
32 #include <stdio.h>
14497
d327fc47f8fd Close SF bug 110826: a complaint about the way Python #define'd NULL.
Tim Peters <tim.peters@gmail.com>
parents: 14375
diff changeset
33 #ifndef NULL
d327fc47f8fd Close SF bug 110826: a complaint about the way Python #define'd NULL.
Tim Peters <tim.peters@gmail.com>
parents: 14375
diff changeset
34 # error "Python.h requires that stdio.h define NULL."
d327fc47f8fd Close SF bug 110826: a complaint about the way Python #define'd NULL.
Tim Peters <tim.peters@gmail.com>
parents: 14375
diff changeset
35 #endif
d327fc47f8fd Close SF bug 110826: a complaint about the way Python #define'd NULL.
Tim Peters <tim.peters@gmail.com>
parents: 14375
diff changeset
36
5397
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
37 #include <string.h>
38716
42808526511c Patch #1495999: Part two of Windows CE changes.
Martin v. Löwis <martin@v.loewis.de>
parents: 38232
diff changeset
38 #ifdef HAVE_ERRNO_H
5397
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
39 #include <errno.h>
38232
aa620856e8a3 Patch #1492356: Port to Windows CE (patch set 1).
Martin v. Löwis <martin@v.loewis.de>
parents: 36065
diff changeset
40 #endif
5397
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
41 #include <stdlib.h>
21712
c64fc56f6072 Include <unistd.h> in Python.h. Fixes #500924.
Martin v. Löwis <martin@v.loewis.de>
parents: 21197
diff changeset
42 #ifdef HAVE_UNISTD_H
c64fc56f6072 Include <unistd.h> in Python.h. Fixes #500924.
Martin v. Löwis <martin@v.loewis.de>
parents: 21197
diff changeset
43 #include <unistd.h>
c64fc56f6072 Include <unistd.h> in Python.h. Fixes #500924.
Martin v. Löwis <martin@v.loewis.de>
parents: 21197
diff changeset
44 #endif
18606
730ab0bed6ab Define NDEBUG when Py_DEBUG undefined, to disable the assert macro.
Guido van Rossum <guido@python.org>
parents: 17597
diff changeset
45
32833
dac9d0664fc3 Use intptr_t/uintptr_t on Windows
Martin v. Löwis <martin@v.loewis.de>
parents: 32421
diff changeset
46 /* For uintptr_t, intptr_t */
dac9d0664fc3 Use intptr_t/uintptr_t on Windows
Martin v. Löwis <martin@v.loewis.de>
parents: 32421
diff changeset
47 #ifdef HAVE_STDDEF_H
dac9d0664fc3 Use intptr_t/uintptr_t on Windows
Martin v. Löwis <martin@v.loewis.de>
parents: 32421
diff changeset
48 #include <stddef.h>
dac9d0664fc3 Use intptr_t/uintptr_t on Windows
Martin v. Löwis <martin@v.loewis.de>
parents: 32421
diff changeset
49 #endif
dac9d0664fc3 Use intptr_t/uintptr_t on Windows
Martin v. Löwis <martin@v.loewis.de>
parents: 32421
diff changeset
50
21197
ad7b4424aab6 Stop defining NDEBUG in Python.h, because it can interfere with
Tim Peters <tim.peters@gmail.com>
parents: 20282
diff changeset
51 /* CAUTION: Build setups should ensure that NDEBUG is defined on the
ad7b4424aab6 Stop defining NDEBUG in Python.h, because it can interfere with
Tim Peters <tim.peters@gmail.com>
parents: 20282
diff changeset
52 * compiler command line when building Python in release mode; else
ad7b4424aab6 Stop defining NDEBUG in Python.h, because it can interfere with
Tim Peters <tim.peters@gmail.com>
parents: 20282
diff changeset
53 * assert() calls won't be removed.
ad7b4424aab6 Stop defining NDEBUG in Python.h, because it can interfere with
Tim Peters <tim.peters@gmail.com>
parents: 20282
diff changeset
54 */
13674
c90d94d287d7 Included assert.h in Python.h -- it's absurd that this basic tool of
Tim Peters <tim.peters@gmail.com>
parents: 13579
diff changeset
55 #include <assert.h>
c90d94d287d7 Included assert.h in Python.h -- it's absurd that this basic tool of
Tim Peters <tim.peters@gmail.com>
parents: 13579
diff changeset
56
23462
61348aa2ff98 Back out #555929
Martin v. Löwis <martin@v.loewis.de>
parents: 23458
diff changeset
57 #include "pyport.h"
61348aa2ff98 Back out #555929
Martin v. Löwis <martin@v.loewis.de>
parents: 23458
diff changeset
58
23657
5f978196fd3d Patch #555929: Cygwin AH_BOTTOM cleanup patch (*** version 2 ***)
Jason Tishler <jason@tishler.net>
parents: 23549
diff changeset
59 /* pyconfig.h or pyport.h may or may not define DL_IMPORT */
5f978196fd3d Patch #555929: Cygwin AH_BOTTOM cleanup patch (*** version 2 ***)
Jason Tishler <jason@tishler.net>
parents: 23549
diff changeset
60 #ifndef DL_IMPORT /* declarations for DLL import/export */
5f978196fd3d Patch #555929: Cygwin AH_BOTTOM cleanup patch (*** version 2 ***)
Jason Tishler <jason@tishler.net>
parents: 23549
diff changeset
61 #define DL_IMPORT(RTYPE) RTYPE
5f978196fd3d Patch #555929: Cygwin AH_BOTTOM cleanup patch (*** version 2 ***)
Jason Tishler <jason@tishler.net>
parents: 23549
diff changeset
62 #endif
5f978196fd3d Patch #555929: Cygwin AH_BOTTOM cleanup patch (*** version 2 ***)
Jason Tishler <jason@tishler.net>
parents: 23549
diff changeset
63 #ifndef DL_EXPORT /* declarations for DLL import/export */
5f978196fd3d Patch #555929: Cygwin AH_BOTTOM cleanup patch (*** version 2 ***)
Jason Tishler <jason@tishler.net>
parents: 23549
diff changeset
64 #define DL_EXPORT(RTYPE) RTYPE
5f978196fd3d Patch #555929: Cygwin AH_BOTTOM cleanup patch (*** version 2 ***)
Jason Tishler <jason@tishler.net>
parents: 23549
diff changeset
65 #endif
5f978196fd3d Patch #555929: Cygwin AH_BOTTOM cleanup patch (*** version 2 ***)
Jason Tishler <jason@tishler.net>
parents: 23549
diff changeset
66
22479
fb45791150d1 Give Python a debug-mode pymalloc, much as sketched on Python-Dev.
Tim Peters <tim.peters@gmail.com>
parents: 21712
diff changeset
67 /* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
fb45791150d1 Give Python a debug-mode pymalloc, much as sketched on Python-Dev.
Tim Peters <tim.peters@gmail.com>
parents: 21712
diff changeset
68 * PYMALLOC_DEBUG is in error if pymalloc is not in use.
fb45791150d1 Give Python a debug-mode pymalloc, much as sketched on Python-Dev.
Tim Peters <tim.peters@gmail.com>
parents: 21712
diff changeset
69 */
fb45791150d1 Give Python a debug-mode pymalloc, much as sketched on Python-Dev.
Tim Peters <tim.peters@gmail.com>
parents: 21712
diff changeset
70 #if defined(Py_DEBUG) && defined(WITH_PYMALLOC) && !defined(PYMALLOC_DEBUG)
fb45791150d1 Give Python a debug-mode pymalloc, much as sketched on Python-Dev.
Tim Peters <tim.peters@gmail.com>
parents: 21712
diff changeset
71 #define PYMALLOC_DEBUG
fb45791150d1 Give Python a debug-mode pymalloc, much as sketched on Python-Dev.
Tim Peters <tim.peters@gmail.com>
parents: 21712
diff changeset
72 #endif
fb45791150d1 Give Python a debug-mode pymalloc, much as sketched on Python-Dev.
Tim Peters <tim.peters@gmail.com>
parents: 21712
diff changeset
73 #if defined(PYMALLOC_DEBUG) && !defined(WITH_PYMALLOC)
fb45791150d1 Give Python a debug-mode pymalloc, much as sketched on Python-Dev.
Tim Peters <tim.peters@gmail.com>
parents: 21712
diff changeset
74 #error "PYMALLOC_DEBUG requires WITH_PYMALLOC"
fb45791150d1 Give Python a debug-mode pymalloc, much as sketched on Python-Dev.
Tim Peters <tim.peters@gmail.com>
parents: 21712
diff changeset
75 #endif
13776
33df3b516711 patch from Vladimir (move Py_Mem* interface to Include/pymem.h)
Peter Schneider-Kamp <nowonder@nowonder.de>
parents: 13761
diff changeset
76 #include "pymem.h"
33df3b516711 patch from Vladimir (move Py_Mem* interface to Include/pymem.h)
Peter Schneider-Kamp <nowonder@nowonder.de>
parents: 13761
diff changeset
77
5397
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
78 #include "object.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
79 #include "objimpl.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
80
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
81 #include "pydebug.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
82
12248
70154e2e9c89 Marc-Andre's third try at this bulk patch seems to work (except that
Guido van Rossum <guido@python.org>
parents: 11964
diff changeset
83 #include "unicodeobject.h"
5397
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
84 #include "intobject.h"
22785
aa8d59823add Add the 'bool' type and its values 'False' and 'True', as described in
Guido van Rossum <guido@python.org>
parents: 22567
diff changeset
85 #include "boolobject.h"
5397
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
86 #include "longobject.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
87 #include "floatobject.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
88 #ifndef WITHOUT_COMPLEX
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
89 #include "complexobject.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
90 #endif
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
91 #include "rangeobject.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
92 #include "stringobject.h"
45832
5c0b5cabeec9 Finish backporting new buffer API to Python 2.6. Left to do: memoryview object and structmodule. But, these need to be finished in Python 3.0 first. No objects support the new buffer API in Python 2.6 as of yet, and except for the memoryview object, I don't think they will.
Travis E. Oliphant <oliphant@enthought.com>
parents: 44344
diff changeset
93 /* #include "memoryobject.h" */
9278
c39218a68df1 Add Greg Stein's buffer object API.
Guido van Rossum <guido@python.org>
parents: 8429
diff changeset
94 #include "bufferobject.h"
46107
5341b30b1812 Merged revisions 61750,61752,61754,61756,61760,61763,61768,61772,61775,61805,61809,61812,61819,61917,61920,61930,61933-61934 via svnmerge from
Christian Heimes <christian@cheimes.de>
parents: 45832
diff changeset
95 #include "bytesobject.h"
5397
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
96 #include "tupleobject.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
97 #include "listobject.h"
5508
3643f19d5ca1 Subsumed mappingobject.h in dictobject.h.
Guido van Rossum <guido@python.org>
parents: 5438
diff changeset
98 #include "dictobject.h"
23285
afe263672fd8 - New builtin function enumerate(x), from PEP 279. Example:
Guido van Rossum <guido@python.org>
parents: 22785
diff changeset
99 #include "enumobject.h"
30929
54ff68e973ee * Migrate set() and frozenset() from the sandbox.
Raymond Hettinger <python@rcn.com>
parents: 24752
diff changeset
100 #include "setobject.h"
5397
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
101 #include "methodobject.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
102 #include "moduleobject.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
103 #include "funcobject.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
104 #include "classobject.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
105 #include "fileobject.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
106 #include "cobject.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
107 #include "traceback.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
108 #include "sliceobject.h"
16256
07071872de3e PEP 227 implementation
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 14869
diff changeset
109 #include "cellobject.h"
17597
32e7d0898eab Iterators phase 1. This comprises:
Guido van Rossum <guido@python.org>
parents: 16256
diff changeset
110 #include "iterobject.h"
32421
485d2ef43419 Patch #966493: Cleanup generator/eval_frame exposure.
Martin v. Löwis <martin@v.loewis.de>
parents: 32305
diff changeset
111 #include "genobject.h"
18933
09df3254b49d Merge of descr-branch back into trunk.
Tim Peters <tim.peters@gmail.com>
parents: 18845
diff changeset
112 #include "descrobject.h"
20282
e3751af0f1dd Include the weakref object interface.
Fred Drake <fdrake@acm.org>
parents: 18933
diff changeset
113 #include "weakrefobject.h"
5397
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
114
11964
4412c7a32497 Marc-Andre Lemburg: include unicodeobject.h and codecs.h
Guido van Rossum <guido@python.org>
parents: 9744
diff changeset
115 #include "codecs.h"
5397
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
116 #include "pyerrors.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
117
5848
f64a5f750696 Include pystate.h earlier so it can be referenced by ceval.h.
Guido van Rossum <guido@python.org>
parents: 5508
diff changeset
118 #include "pystate.h"
f64a5f750696 Include pystate.h earlier so it can be referenced by ceval.h.
Guido van Rossum <guido@python.org>
parents: 5508
diff changeset
119
36065
ea083efdc96c Merge from ast-arena. This reduces the code in Python/ast.c by ~300 lines,
Neal Norwitz <nnorwitz@gmail.com>
parents: 35742
diff changeset
120 #include "pyarena.h"
5397
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
121 #include "modsupport.h"
18611
fdb36a0c7e6e Part way to allowing "from __future__ import generators" to communicate
Tim Peters <tim.peters@gmail.com>
parents: 18607
diff changeset
122 #include "pythonrun.h"
5397
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
123 #include "ceval.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
124 #include "sysmodule.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
125 #include "intrcheck.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
126 #include "import.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
127
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
128 #include "abstract.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
129
31656
03693af46afb compile.h and eval.h weren't being included which kept a fair bit of the
Skip Montanaro <skip@pobox.com>
parents: 31504
diff changeset
130 #include "compile.h"
03693af46afb compile.h and eval.h weren't being included which kept a fair bit of the
Skip Montanaro <skip@pobox.com>
parents: 31504
diff changeset
131 #include "eval.h"
03693af46afb compile.h and eval.h weren't being included which kept a fair bit of the
Skip Montanaro <skip@pobox.com>
parents: 31504
diff changeset
132
32305
13656d58d450 Patch #774665: Make Python LC_NUMERIC agnostic.
Martin v. Löwis <martin@v.loewis.de>
parents: 31656
diff changeset
133 #include "pystrtod.h"
44344
1d69aabf6f7f Applied patch #1635: Float patch for inf and nan on Windows (and other platforms).
Christian Heimes <christian@cheimes.de>
parents: 38716
diff changeset
134 #include "pystrcmp.h"
32305
13656d58d450 Patch #774665: Make Python LC_NUMERIC agnostic.
Martin v. Löwis <martin@v.loewis.de>
parents: 31656
diff changeset
135
23950
f7ce696979e1 SF 569257 -- Name mangle double underscored variable names in __slots__.
Raymond Hettinger <python@rcn.com>
parents: 23746
diff changeset
136 /* _Py_Mangle is defined in compile.c */
35742
1c4d192f1568 Merge ast-branch to head
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 32833
diff changeset
137 PyAPI_FUNC(PyObject*) _Py_Mangle(PyObject *p, PyObject *name);
23950
f7ce696979e1 SF 569257 -- Name mangle double underscored variable names in __slots__.
Raymond Hettinger <python@rcn.com>
parents: 23746
diff changeset
138
22567
aedda0abd313 Add a comment that PyArg_GetInt is deprecated and should not be used
Neal Norwitz <nnorwitz@gmail.com>
parents: 22561
diff changeset
139 /* PyArg_GetInt is deprecated and should not be used, use PyArg_Parse(). */
5397
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
140 #define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a))
22561
043ad7adc896 Remove many uses of PyArg_NoArgs macro, change METH_OLDARGS to METH_NOARGS.
Neal Norwitz <nnorwitz@gmail.com>
parents: 22479
diff changeset
141
043ad7adc896 Remove many uses of PyArg_NoArgs macro, change METH_OLDARGS to METH_NOARGS.
Neal Norwitz <nnorwitz@gmail.com>
parents: 22479
diff changeset
142 /* PyArg_NoArgs should not be necessary.
043ad7adc896 Remove many uses of PyArg_NoArgs macro, change METH_OLDARGS to METH_NOARGS.
Neal Norwitz <nnorwitz@gmail.com>
parents: 22479
diff changeset
143 Set ml_flags in the PyMethodDef to METH_NOARGS. */
5397
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
144 #define PyArg_NoArgs(v) PyArg_Parse(v, "")
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
145
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
146 /* Convert a possibly signed character to a nonnegative int */
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
147 /* XXX This assumes characters are 8 bits wide */
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
148 #ifdef __CHAR_UNSIGNED__
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
149 #define Py_CHARMASK(c) (c)
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
150 #else
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
151 #define Py_CHARMASK(c) ((c) & 0xff)
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
152 #endif
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
153
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
154 #include "pyfpe.h"
fd7eb058ce5d Moved allobjects.h to Python.h (without rename2.h).
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
155
12784
5398b18f8319 Typo fix in comment.
Greg Ward <gward@python.net>
parents: 12611
diff changeset
156 /* These definitions must match corresponding definitions in graminit.h.
5438
e926c331ebbf Instead of importing graminit.h whenever one of the three grammar 'root'
Guido van Rossum <guido@python.org>
parents: 5405
diff changeset
157 There's code in compile.c that checks that they are the same. */
e926c331ebbf Instead of importing graminit.h whenever one of the three grammar 'root'
Guido van Rossum <guido@python.org>
parents: 5405
diff changeset
158 #define Py_single_input 256
e926c331ebbf Instead of importing graminit.h whenever one of the three grammar 'root'
Guido van Rossum <guido@python.org>
parents: 5405
diff changeset
159 #define Py_file_input 257
e926c331ebbf Instead of importing graminit.h whenever one of the three grammar 'root'
Guido van Rossum <guido@python.org>
parents: 5405
diff changeset
160 #define Py_eval_input 258
e926c331ebbf Instead of importing graminit.h whenever one of the three grammar 'root'
Guido van Rossum <guido@python.org>
parents: 5405
diff changeset
161
14674
756c8c6535fe Make better use of GNU Pth -- patch by Andy Dustman.
Guido van Rossum <guido@python.org>
parents: 14497
diff changeset
162 #ifdef HAVE_PTH
12611
b320cf3a98b9 Andy Dustman: add GNU pth user-space thread support.
Guido van Rossum <guido@python.org>
parents: 12248
diff changeset
163 /* GNU pth user-space thread support */
b320cf3a98b9 Andy Dustman: add GNU pth user-space thread support.
Guido van Rossum <guido@python.org>
parents: 12248
diff changeset
164 #include <pth.h>
b320cf3a98b9 Andy Dustman: add GNU pth user-space thread support.
Guido van Rossum <guido@python.org>
parents: 12248
diff changeset
165 #endif
23746
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23657
diff changeset
166
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23657
diff changeset
167 /* Define macros for inline documentation. */
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23657
diff changeset
168 #define PyDoc_VAR(name) static char name[]
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23657
diff changeset
169 #define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23657
diff changeset
170 #ifdef WITH_DOC_STRINGS
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23657
diff changeset
171 #define PyDoc_STR(str) str
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23657
diff changeset
172 #else
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23657
diff changeset
173 #define PyDoc_STR(str) ""
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23657
diff changeset
174 #endif
43ddcdcd3c71 Patch #505375: Make doc strings optional.
Martin v. Löwis <martin@v.loewis.de>
parents: 23657
diff changeset
175
5398
72b231edfb25 Several oopsies -- Py_ALLOBJECTS_H -> Py_PYTHON_H, temporarily removed
Guido van Rossum <guido@python.org>
parents: 5397
diff changeset
176 #endif /* !Py_PYTHON_H */