blob: d50d02885f3f2331eb2285b71ccd1a4eb4fd67b5 [file] [log] [blame]
Guido van Rossum81daa321993-05-20 14:24:46 +00001/***********************************************************
2Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
3Amsterdam, The Netherlands.
4
5 All Rights Reserved
6
7Permission to use, copy, modify, and distribute this software and its
8documentation for any purpose and without fee is hereby granted,
9provided that the above copyright notice appear in all copies and that
10both that copyright notice and this permission notice appear in
11supporting documentation, and that the names of Stichting Mathematisch
12Centrum or CWI not be used in advertising or publicity pertaining to
13distribution of the software without specific, written prior permission.
14
15STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
16THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
18FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
21OF 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
43extern typeobject Accesstype;
44
45#define is_accessobject(v) ((v)->ob_type == &Accesstype)
46
47object *newaccessobject PROTO((object *, object *, typeobject *, int));
48object *getaccessvalue PROTO((object *, object *));
49int setaccessvalue PROTO((object *, object *, object *));
50
51void setaccessowner PROTO((object *, object *));
52object *cloneaccessobject PROTO((object *));
Guido van Rossumb3f72581993-05-21 19:56:10 +000053int hasaccessvalue PROTO((object *));
Guido van Rossum81daa321993-05-20 14:24:46 +000054
55extern typeobject Anynumbertype, Anysequencetype, Anymappingtype;