Guido van Rossum | 81daa32 | 1993-05-20 14:24:46 +0000 | [diff] [blame] | 1 | /*********************************************************** |
| 2 | Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum, |
| 3 | Amsterdam, The Netherlands. |
| 4 | |
| 5 | All Rights Reserved |
| 6 | |
| 7 | Permission to use, copy, modify, and distribute this software and its |
| 8 | documentation for any purpose and without fee is hereby granted, |
| 9 | provided that the above copyright notice appear in all copies and that |
| 10 | both that copyright notice and this permission notice appear in |
| 11 | supporting documentation, and that the names of Stichting Mathematisch |
| 12 | Centrum or CWI not be used in advertising or publicity pertaining to |
| 13 | distribution of the software without specific, written prior permission. |
| 14 | |
| 15 | STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO |
| 16 | THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND |
| 17 | FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE |
| 18 | FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 19 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 20 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
| 21 | OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 22 | |
| 23 | ******************************************************************/ |
| 24 | |
| 25 | /* Access object interface */ |
| 26 | |
| 27 | /* Access mode bits (note similarity with UNIX permissions) */ |
| 28 | #define AC_R 0444 |
| 29 | #define AC_W 0222 |
| 30 | |
| 31 | #define AC_PRIVATE 0700 |
| 32 | #define AC_R_PRIVATE 0400 |
| 33 | #define AC_W_PRIVATE 0200 |
| 34 | |
| 35 | #define AC_PROTECTED 0070 |
| 36 | #define AC_R_PROTECTED 0040 |
| 37 | #define AC_W_PROTECTED 0020 |
| 38 | |
| 39 | #define AC_PUBLIC 0007 |
| 40 | #define AC_R_PUBLIC 0004 |
| 41 | #define AC_W_PUBLIC 0002 |
| 42 | |
| 43 | extern typeobject Accesstype; |
| 44 | |
| 45 | #define is_accessobject(v) ((v)->ob_type == &Accesstype) |
| 46 | |
| 47 | object *newaccessobject PROTO((object *, object *, typeobject *, int)); |
| 48 | object *getaccessvalue PROTO((object *, object *)); |
| 49 | int setaccessvalue PROTO((object *, object *, object *)); |
| 50 | |
| 51 | void setaccessowner PROTO((object *, object *)); |
| 52 | object *cloneaccessobject PROTO((object *)); |
Guido van Rossum | b3f7258 | 1993-05-21 19:56:10 +0000 | [diff] [blame] | 53 | int hasaccessvalue PROTO((object *)); |
Guido van Rossum | 81daa32 | 1993-05-20 14:24:46 +0000 | [diff] [blame] | 54 | |
| 55 | extern typeobject Anynumbertype, Anysequencetype, Anymappingtype; |