32-way branching in intmap.scm, not 16-way
[bpt/guile.git] / libguile / variable.h
1 /* classes: h_files */
2
3 #ifndef SCM_VARIABLE_H
4 #define SCM_VARIABLE_H
5
6 /* Copyright (C) 1995,1996,2000,2001, 2006, 2008, 2011 Free Software Foundation, Inc.
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 3 of
11 * the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 * 02110-1301 USA
22 */
23
24 \f
25
26 #include "libguile/__scm.h"
27 #include "libguile/smob.h"
28
29 \f
30
31 /* Variables
32 */
33 #define SCM_VARIABLEP(X) (SCM_HAS_TYP7 (X, scm_tc7_variable))
34 #define SCM_VARIABLE_REF(V) SCM_CELL_OBJECT_1 (V)
35 #define SCM_VARIABLE_SET(V, X) SCM_SET_CELL_OBJECT_1 (V, X)
36 #define SCM_VARIABLE_LOC(V) (SCM_CELL_OBJECT_LOC ((V), 1))
37
38 \f
39
40 SCM_API SCM scm_make_variable (SCM init);
41 SCM_API SCM scm_make_undefined_variable (void);
42 SCM_API SCM scm_variable_p (SCM obj);
43 SCM_API SCM scm_variable_ref (SCM var);
44 SCM_API SCM scm_variable_set_x (SCM var, SCM val);
45 SCM_API SCM scm_variable_unset_x (SCM var);
46 SCM_API SCM scm_variable_bound_p (SCM var);
47
48 SCM_INTERNAL void scm_i_variable_print (SCM var, SCM port, scm_print_state *pstate);
49
50 SCM_INTERNAL void scm_init_variable (void);
51
52 #endif /* SCM_VARIABLE_H */
53
54 /*
55 Local Variables:
56 c-file-style: "gnu"
57 End:
58 */