Commit | Line | Data |
---|---|---|
19e2247d MV |
1 | /* This file contains definitions for deprecated features. When you |
2 | deprecate something, move it here when that is feasible. | |
3 | */ | |
4 | ||
79488112 | 5 | /* Copyright (C) 2003, 2004, 2006, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. |
19e2247d | 6 | * |
73be1d9e | 7 | * This library is free software; you can redistribute it and/or |
53befeb7 NJ |
8 | * modify it under the terms of the GNU Lesser General Public License |
9 | * as published by the Free Software Foundation; either version 3 of | |
10 | * the License, or (at your option) any later version. | |
19e2247d | 11 | * |
53befeb7 NJ |
12 | * This library is distributed in the hope that it will be useful, but |
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
73be1d9e MV |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 | * Lesser General Public License for more details. | |
19e2247d | 16 | * |
73be1d9e MV |
17 | * You should have received a copy of the GNU Lesser General Public |
18 | * License along with this library; if not, write to the Free Software | |
53befeb7 NJ |
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
20 | * 02110-1301 USA | |
73be1d9e | 21 | */ |
19e2247d | 22 | |
dbb605f5 LC |
23 | #ifdef HAVE_CONFIG_H |
24 | # include <config.h> | |
25 | #endif | |
26 | ||
0eb934f1 LC |
27 | #define SCM_BUILDING_DEPRECATED_CODE |
28 | ||
19e2247d | 29 | #include "libguile/_scm.h" |
55d30fac | 30 | #include "libguile/deprecation.h" |
3452e666 | 31 | |
19e2247d MV |
32 | #if (SCM_ENABLE_DEPRECATED == 1) |
33 | ||
f3c6a02c AW |
34 | \f |
35 | ||
b2feee6b AW |
36 | SCM |
37 | scm_internal_dynamic_wind (scm_t_guard before, | |
38 | scm_t_inner inner, | |
39 | scm_t_guard after, | |
40 | void *inner_data, | |
41 | void *guard_data) | |
42 | { | |
43 | SCM ans; | |
44 | ||
45 | scm_c_issue_deprecation_warning | |
46 | ("`scm_internal_dynamic_wind' is deprecated. " | |
47 | "Use the `scm_dynwind_begin' / `scm_dynwind_end' API instead."); | |
48 | ||
49 | scm_dynwind_begin (SCM_F_DYNWIND_REWINDABLE); | |
50 | scm_dynwind_rewind_handler (before, guard_data, SCM_F_WIND_EXPLICITLY); | |
51 | scm_dynwind_unwind_handler (after, guard_data, SCM_F_WIND_EXPLICITLY); | |
52 | ans = inner (inner_data); | |
53 | scm_dynwind_end (); | |
54 | return ans; | |
55 | } | |
56 | ||
57 | \f | |
58 | ||
65619ebe AW |
59 | SCM |
60 | scm_immutable_cell (scm_t_bits car, scm_t_bits cdr) | |
61 | { | |
62 | scm_c_issue_deprecation_warning | |
63 | ("scm_immutable_cell is deprecated. Use scm_cell instead."); | |
64 | ||
65 | return scm_cell (car, cdr); | |
66 | } | |
67 | ||
68 | SCM | |
69 | scm_immutable_double_cell (scm_t_bits car, scm_t_bits cbr, | |
70 | scm_t_bits ccr, scm_t_bits cdr) | |
71 | { | |
72 | scm_c_issue_deprecation_warning | |
73 | ("scm_immutable_double_cell is deprecated. Use scm_double_cell instead."); | |
74 | ||
75 | return scm_double_cell (car, cbr, ccr, cdr); | |
76 | } | |
77 | ||
78 | ||
79 | \f | |
80 | ||
19e2247d MV |
81 | void |
82 | scm_i_init_deprecated () | |
83 | { | |
84 | #include "libguile/deprecated.x" | |
85 | } | |
86 | ||
87 | #endif |