Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 1 | #ifndef Py_ACCESSOBJECT_H |
| 2 | #define Py_ACCESSOBJECT_H |
| 3 | #ifdef __cplusplus |
| 4 | extern "C" { |
| 5 | #endif |
| 6 | |
Guido van Rossum | 81daa32 | 1993-05-20 14:24:46 +0000 | [diff] [blame] | 7 | /*********************************************************** |
Guido van Rossum | 5799b52 | 1995-01-04 19:06:22 +0000 | [diff] [blame] | 8 | Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
| 9 | The Netherlands. |
Guido van Rossum | 81daa32 | 1993-05-20 14:24:46 +0000 | [diff] [blame] | 10 | |
| 11 | All Rights Reserved |
| 12 | |
Guido van Rossum | d266eb4 | 1996-10-25 14:44:06 +0000 | [diff] [blame^] | 13 | Permission to use, copy, modify, and distribute this software and its |
| 14 | documentation for any purpose and without fee is hereby granted, |
Guido van Rossum | 81daa32 | 1993-05-20 14:24:46 +0000 | [diff] [blame] | 15 | provided that the above copyright notice appear in all copies and that |
Guido van Rossum | d266eb4 | 1996-10-25 14:44:06 +0000 | [diff] [blame^] | 16 | both that copyright notice and this permission notice appear in |
Guido van Rossum | 81daa32 | 1993-05-20 14:24:46 +0000 | [diff] [blame] | 17 | supporting documentation, and that the names of Stichting Mathematisch |
Guido van Rossum | d266eb4 | 1996-10-25 14:44:06 +0000 | [diff] [blame^] | 18 | Centrum or CWI or Corporation for National Research Initiatives or |
| 19 | CNRI not be used in advertising or publicity pertaining to |
| 20 | distribution of the software without specific, written prior |
| 21 | permission. |
Guido van Rossum | 81daa32 | 1993-05-20 14:24:46 +0000 | [diff] [blame] | 22 | |
Guido van Rossum | d266eb4 | 1996-10-25 14:44:06 +0000 | [diff] [blame^] | 23 | While CWI is the initial source for this software, a modified version |
| 24 | is made available by the Corporation for National Research Initiatives |
| 25 | (CNRI) at the Internet address ftp://ftp.python.org. |
| 26 | |
| 27 | STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH |
| 28 | REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF |
| 29 | MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH |
| 30 | CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL |
| 31 | DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 32 | PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 33 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 34 | PERFORMANCE OF THIS SOFTWARE. |
Guido van Rossum | 81daa32 | 1993-05-20 14:24:46 +0000 | [diff] [blame] | 35 | |
| 36 | ******************************************************************/ |
| 37 | |
Guido van Rossum | 0dfcf75 | 1996-08-12 22:00:53 +0000 | [diff] [blame] | 38 | /* This object type is no longer supported */ |
| 39 | |
| 40 | #ifdef SUPPORT_OBSOLETE_ACCESS |
| 41 | |
Guido van Rossum | 81daa32 | 1993-05-20 14:24:46 +0000 | [diff] [blame] | 42 | /* Access object interface */ |
| 43 | |
| 44 | /* Access mode bits (note similarity with UNIX permissions) */ |
| 45 | #define AC_R 0444 |
| 46 | #define AC_W 0222 |
| 47 | |
| 48 | #define AC_PRIVATE 0700 |
| 49 | #define AC_R_PRIVATE 0400 |
| 50 | #define AC_W_PRIVATE 0200 |
| 51 | |
| 52 | #define AC_PROTECTED 0070 |
| 53 | #define AC_R_PROTECTED 0040 |
| 54 | #define AC_W_PROTECTED 0020 |
| 55 | |
| 56 | #define AC_PUBLIC 0007 |
| 57 | #define AC_R_PUBLIC 0004 |
| 58 | #define AC_W_PUBLIC 0002 |
| 59 | |
Guido van Rossum | 051ab12 | 1995-02-27 10:17:52 +0000 | [diff] [blame] | 60 | extern DL_IMPORT(PyTypeObject) PyAccess_Type; |
Guido van Rossum | 81daa32 | 1993-05-20 14:24:46 +0000 | [diff] [blame] | 61 | |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 62 | #define PyAccess_Check(v) ((v)->ob_type == &PyAccess_Type) |
Guido van Rossum | 81daa32 | 1993-05-20 14:24:46 +0000 | [diff] [blame] | 63 | |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 64 | PyObject *PyAccess_FromValue Py_PROTO((PyObject *, PyObject *, PyTypeObject *, int)); |
| 65 | PyObject *PyAccess_AsValue Py_PROTO((PyObject *, PyObject *)); |
| 66 | int PyAccess_SetValue Py_PROTO((PyObject *, PyObject *, PyObject *)); |
Guido van Rossum | 81daa32 | 1993-05-20 14:24:46 +0000 | [diff] [blame] | 67 | |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 68 | void PyAccess_SetOwner Py_PROTO((PyObject *, PyObject *)); |
| 69 | PyObject *PyAccess_Clone Py_PROTO((PyObject *)); |
| 70 | int PyAccess_HasValue Py_PROTO((PyObject *)); |
Guido van Rossum | 81daa32 | 1993-05-20 14:24:46 +0000 | [diff] [blame] | 71 | |
Guido van Rossum | 051ab12 | 1995-02-27 10:17:52 +0000 | [diff] [blame] | 72 | extern DL_IMPORT(PyTypeObject) PyAnyNumber_Type, PyAnySequence_Type, PyAnyMapping_Type; |
Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 73 | |
Guido van Rossum | 0dfcf75 | 1996-08-12 22:00:53 +0000 | [diff] [blame] | 74 | #endif /* !SUPPORT_OBSOLETE_ACCESS */ |
| 75 | |
Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 76 | #ifdef __cplusplus |
| 77 | } |
| 78 | #endif |
| 79 | #endif /* !Py_ACCESSOBJECT_H */ |