Mercurial > cpython-lru_cache-weakref
annotate Include/accessobject.h @ 4566:6403c94de50d legacy-trunk
Added safeguard against failure in __del__.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 27 Nov 1996 19:39:58 +0000 |
| parents | 65d2d8e67da3 |
| children |
| rev | line source |
|---|---|
|
1329
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1290
diff
changeset
|
1 #ifndef Py_ACCESSOBJECT_H |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1290
diff
changeset
|
2 #define Py_ACCESSOBJECT_H |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1290
diff
changeset
|
3 #ifdef __cplusplus |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1290
diff
changeset
|
4 extern "C" { |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1290
diff
changeset
|
5 #endif |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1290
diff
changeset
|
6 |
|
1289
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
7 /*********************************************************** |
| 2058 | 8 Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
| 9 The Netherlands. | |
|
1289
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
10 |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
11 All Rights Reserved |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
12 |
|
4503
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
13 Permission to use, copy, modify, and distribute this software and its |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
14 documentation for any purpose and without fee is hereby granted, |
|
1289
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
15 provided that the above copyright notice appear in all copies and that |
|
4503
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
16 both that copyright notice and this permission notice appear in |
|
1289
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
17 supporting documentation, and that the names of Stichting Mathematisch |
|
4503
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
18 Centrum or CWI or Corporation for National Research Initiatives or |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
19 CNRI not be used in advertising or publicity pertaining to |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
20 distribution of the software without specific, written prior |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
21 permission. |
|
1289
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
22 |
|
4503
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
23 While CWI is the initial source for this software, a modified version |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
24 is made available by the Corporation for National Research Initiatives |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
25 (CNRI) at the Internet address ftp://ftp.python.org. |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
26 |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
27 STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
28 REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
29 MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
30 CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
31 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
32 PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
33 TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4003
diff
changeset
|
34 PERFORMANCE OF THIS SOFTWARE. |
|
1289
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
35 |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
36 ******************************************************************/ |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
37 |
|
4003
138fa15a1032
Disable support for access statement
Guido van Rossum <guido@python.org>
parents:
2436
diff
changeset
|
38 /* This object type is no longer supported */ |
|
138fa15a1032
Disable support for access statement
Guido van Rossum <guido@python.org>
parents:
2436
diff
changeset
|
39 |
|
138fa15a1032
Disable support for access statement
Guido van Rossum <guido@python.org>
parents:
2436
diff
changeset
|
40 #ifdef SUPPORT_OBSOLETE_ACCESS |
|
138fa15a1032
Disable support for access statement
Guido van Rossum <guido@python.org>
parents:
2436
diff
changeset
|
41 |
|
1289
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
42 /* Access object interface */ |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
43 |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
44 /* Access mode bits (note similarity with UNIX permissions) */ |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
45 #define AC_R 0444 |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
46 #define AC_W 0222 |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
47 |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
48 #define AC_PRIVATE 0700 |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
49 #define AC_R_PRIVATE 0400 |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
50 #define AC_W_PRIVATE 0200 |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
51 |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
52 #define AC_PROTECTED 0070 |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
53 #define AC_R_PROTECTED 0040 |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
54 #define AC_W_PROTECTED 0020 |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
55 |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
56 #define AC_PUBLIC 0007 |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
57 #define AC_R_PUBLIC 0004 |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
58 #define AC_W_PUBLIC 0002 |
|
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
59 |
|
2436
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
60 extern DL_IMPORT(PyTypeObject) PyAccess_Type; |
|
1289
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
61 |
|
2146
9afdbf944c2a
new names for lots of new functions
Guido van Rossum <guido@python.org>
parents:
2129
diff
changeset
|
62 #define PyAccess_Check(v) ((v)->ob_type == &PyAccess_Type) |
|
1289
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
63 |
|
2146
9afdbf944c2a
new names for lots of new functions
Guido van Rossum <guido@python.org>
parents:
2129
diff
changeset
|
64 PyObject *PyAccess_FromValue Py_PROTO((PyObject *, PyObject *, PyTypeObject *, int)); |
|
9afdbf944c2a
new names for lots of new functions
Guido van Rossum <guido@python.org>
parents:
2129
diff
changeset
|
65 PyObject *PyAccess_AsValue Py_PROTO((PyObject *, PyObject *)); |
|
9afdbf944c2a
new names for lots of new functions
Guido van Rossum <guido@python.org>
parents:
2129
diff
changeset
|
66 int PyAccess_SetValue Py_PROTO((PyObject *, PyObject *, PyObject *)); |
|
1289
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
67 |
|
2146
9afdbf944c2a
new names for lots of new functions
Guido van Rossum <guido@python.org>
parents:
2129
diff
changeset
|
68 void PyAccess_SetOwner Py_PROTO((PyObject *, PyObject *)); |
|
9afdbf944c2a
new names for lots of new functions
Guido van Rossum <guido@python.org>
parents:
2129
diff
changeset
|
69 PyObject *PyAccess_Clone Py_PROTO((PyObject *)); |
|
9afdbf944c2a
new names for lots of new functions
Guido van Rossum <guido@python.org>
parents:
2129
diff
changeset
|
70 int PyAccess_HasValue Py_PROTO((PyObject *)); |
|
1289
4d292c7857d4
Access checks now work, at least for instance data (not for methods
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
71 |
|
2436
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
72 extern DL_IMPORT(PyTypeObject) PyAnyNumber_Type, PyAnySequence_Type, PyAnyMapping_Type; |
|
1329
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1290
diff
changeset
|
73 |
|
4003
138fa15a1032
Disable support for access statement
Guido van Rossum <guido@python.org>
parents:
2436
diff
changeset
|
74 #endif /* !SUPPORT_OBSOLETE_ACCESS */ |
|
138fa15a1032
Disable support for access statement
Guido van Rossum <guido@python.org>
parents:
2436
diff
changeset
|
75 |
|
1329
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1290
diff
changeset
|
76 #ifdef __cplusplus |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1290
diff
changeset
|
77 } |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1290
diff
changeset
|
78 #endif |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1290
diff
changeset
|
79 #endif /* !Py_ACCESSOBJECT_H */ |
