1 /* This file contains definitions for deprecated features. When you
2 deprecate something, move it here when that is feasible.
5 #ifndef SCM_DEPRECATED_H
6 #define SCM_DEPRECATED_H
8 /* Copyright (C) 2003,2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public License
12 * as published by the Free Software Foundation; either version 3 of
13 * the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26 #include "libguile/__scm.h"
27 #include "libguile/arrays.h"
28 #include "libguile/strings.h"
30 #if (SCM_ENABLE_DEPRECATED == 1)
32 /* From eval.h: Macros for handling ilocs. These were deprecated in guile
33 * 1.7.0 on 2004-04-22. */
34 #define SCM_IFRINC (0x00000100L)
35 #define SCM_ICDR (0x00080000L)
36 #define SCM_IFRAME(n) ((long)((SCM_ICDR-SCM_IFRINC)>>8) \
37 & (SCM_UNPACK (n) >> 8))
38 #define SCM_IDIST(n) (SCM_UNPACK (n) >> 20)
39 #define SCM_ICDRP(n) (SCM_ICDR & SCM_UNPACK (n))
42 /* From tags.h: Macros to access internal symbol names of isyms. Deprecated
43 * in guile 1.7.0 on 2004-04-22. */
44 SCM_API
char *scm_isymnames
[];
45 #define SCM_ISYMNUM(n) 0
46 #define SCM_ISYMCHARS(n) "#@<deprecated>"
49 /* From tags.h: Macro checking for two tc16 types that are allocated to differ
50 * only in the 's'-bit. Deprecated in guile 1.7.0 on 2003-09-21. */
51 #define SCM_TYP16S(x) (0xfeff & SCM_CELL_TYPE (x))
54 /* From numbers.h: Macros checking for types, but avoiding a redundant check
55 * for !SCM_IMP. These were deprecated in guile 1.7.0 on 2003-09-06. */
56 #define SCM_SLOPPY_INEXACTP(x) (SCM_TYP16S (x) == scm_tc16_real)
57 #define SCM_SLOPPY_REALP(x) (SCM_TYP16 (x) == scm_tc16_real)
58 #define SCM_SLOPPY_COMPLEXP(x) (SCM_TYP16 (x) == scm_tc16_complex)
61 /* From eval.h: Macros for handling ilocs. These were deprecated in guile
62 * 1.7.0 on 2003-06-04. */
63 #define SCM_ILOC00 SCM_MAKE_ITAG8(0L, scm_tc8_iloc)
64 #define SCM_IDINC (0x00100000L)
65 #define SCM_IDSTMSK (-SCM_IDINC)
68 /* From eval.h: Error messages of the evaluator. These were deprecated in
69 * guile 1.7.0 on 2003-06-02. */
70 SCM_API
const char scm_s_expression
[];
71 SCM_API
const char scm_s_test
[];
72 SCM_API
const char scm_s_body
[];
73 SCM_API
const char scm_s_bindings
[];
74 SCM_API
const char scm_s_variable
[];
75 SCM_API
const char scm_s_clauses
[];
76 SCM_API
const char scm_s_formals
[];
79 /* From eval.h: Helper macros for evaluation and application. These were
80 * deprecated in guile 1.7.0 on 2003-06-02. */
81 #define SCM_EVALIM2(x) \
82 ((scm_is_eq ((x), SCM_EOL) \
83 ? scm_misc_error (NULL, scm_s_expression, SCM_EOL), 0 \
86 #define SCM_EVALIM(x, env) (SCM_ILOCP (x) \
87 ? *scm_ilookup ((x), env) \
89 #define SCM_XEVAL(x, env) (scm_i_eval_x ((x), (env)))
90 #define SCM_XEVALCAR(x, env) (SCM_SYMBOLP (SCM_CAR (x)) \
91 ? *scm_lookupcar (x, env, 1) \
92 : scm_i_eval_x (SCM_CAR (x), (env)))
95 #define scm_substring_move_left_x scm_substring_move_x
96 #define scm_substring_move_right_x scm_substring_move_x
98 #define scm_sizet size_t
100 SCM_API SCM
scm_wta (SCM arg
, const char *pos
, const char *s_subr
);
103 #define SCM_OUTOFRANGE 10
104 #define SCM_NALLOC 11
106 SCM_API
void scm_register_module_xxx (char *module_name
, void *init_func
);
107 SCM_API SCM
scm_registered_modules (void);
108 SCM_API SCM
scm_clear_registered_modules (void);
110 SCM_API SCM
scm_protect_object (SCM obj
);
111 SCM_API SCM
scm_unprotect_object (SCM obj
);
113 #define SCM_SETAND_CAR(x, y) \
114 (SCM_SETCAR ((x), SCM_PACK (SCM_UNPACK (SCM_CAR (x)) & (y))))
115 #define SCM_SETOR_CAR(x, y)\
116 (SCM_SETCAR ((x), SCM_PACK (SCM_UNPACK (SCM_CAR (x)) | (y))))
117 #define SCM_SETAND_CDR(x, y)\
118 (SCM_SETCDR ((x), SCM_PACK (SCM_UNPACK (SCM_CDR (x)) & (y))))
119 #define SCM_SETOR_CDR(x, y)\
120 (SCM_SETCDR ((x), SCM_PACK (SCM_UNPACK (SCM_CDR (x)) | (y))))
121 #define SCM_FREEP(x) (0)
122 #define SCM_NFREEP(x) (1)
123 #define SCM_GC8MARKP(x) SCM_GC_MARK_P (x)
124 #define SCM_SETGC8MARK(x) SCM_SET_GC_MARK (x)
125 #define SCM_CLRGC8MARK(x) SCM_CLEAR_GC_MARK (x)
126 #define SCM_GCTYP16(x) SCM_TYP16 (x)
127 #define SCM_GCCDR(x) SCM_CDR (x)
128 SCM_API
void scm_remember (SCM
* ptr
);
130 SCM_API SCM
scm_the_root_module (void);
131 SCM_API SCM
scm_make_module (SCM name
);
132 SCM_API SCM
scm_ensure_user_module (SCM name
);
133 SCM_API SCM
scm_load_scheme_module (SCM name
);
135 #define scm_port scm_t_port
136 #define scm_ptob_descriptor scm_t_ptob_descriptor
137 #define scm_port_rw_active scm_t_port_rw_active
139 SCM_API SCM
scm_close_all_ports_except (SCM ports
);
141 #define scm_rstate scm_t_rstate
142 #define scm_rng scm_t_rng
144 #define SCM_SLOPPY_CONSP(x) ((1 & SCM_CELL_TYPE (x)) == 0)
145 #define SCM_SLOPPY_NCONSP(x) (!SCM_SLOPPY_CONSP(x))
147 #define scm_tc7_ssymbol scm_tc7_symbol
148 #define scm_tc7_msymbol scm_tc7_symbol
149 #define scm_tcs_symbols scm_tc7_symbol
151 SCM_API SCM
scm_makstr (size_t len
, int);
152 SCM_API SCM
scm_makfromstr (const char *src
, size_t len
, int);
154 SCM_API SCM
scm_variable_set_name_hint (SCM var
, SCM hint
);
155 SCM_API SCM
scm_builtin_variable (SCM name
);
157 SCM_API SCM
scm_internal_with_fluids (SCM fluids
, SCM vals
,
158 SCM (*cproc
)(void *), void *cdata
);
160 SCM_API SCM
scm_make_gsubr (const char *name
, int req
, int opt
, int rst
,
162 SCM_API SCM
scm_make_gsubr_with_generic (const char *name
,
169 SCM_API SCM
scm_create_hook (const char* name
, int n_args
);
171 #define SCM_LIST0 SCM_EOL
172 #define SCM_LIST1(e0) scm_cons ((e0), SCM_EOL)
173 #define SCM_LIST2(e0, e1) scm_cons2 ((e0), (e1), SCM_EOL)
174 #define SCM_LIST3(e0, e1, e2) scm_cons ((e0), SCM_LIST2 ((e1), (e2)))
175 #define SCM_LIST4(e0, e1, e2, e3)\
176 scm_cons2 ((e0), (e1), SCM_LIST2 ((e2), (e3)))
177 #define SCM_LIST5(e0, e1, e2, e3, e4)\
178 scm_cons ((e0), SCM_LIST4 ((e1), (e2), (e3), (e4)))
179 #define SCM_LIST6(e0, e1, e2, e3, e4, e5)\
180 scm_cons2 ((e0), (e1), SCM_LIST4 ((e2), (e3), (e4), (e5)))
181 #define SCM_LIST7(e0, e1, e2, e3, e4, e5, e6)\
182 scm_cons ((e0), SCM_LIST6 ((e1), (e2), (e3), (e4), (e5), (e6)))
183 #define SCM_LIST8(e0, e1, e2, e3, e4, e5, e6, e7)\
184 scm_cons2 ((e0), (e1), SCM_LIST6 ((e2), (e3), (e4), (e5), (e6), (e7)))
185 #define SCM_LIST9(e0, e1, e2, e3, e4, e5, e6, e7, e8)\
187 SCM_LIST8 ((e1), (e2), (e3), (e4), (e5), (e6), (e7), (e8)))
189 #define scm_listify scm_list_n
191 SCM_API SCM
scm_sloppy_memq (SCM x
, SCM lst
);
192 SCM_API SCM
scm_sloppy_memv (SCM x
, SCM lst
);
193 SCM_API SCM
scm_sloppy_member (SCM x
, SCM lst
);
195 SCM_API SCM
scm_read_and_eval_x (SCM port
);
197 #define scm_subr_entry scm_t_subr_entry
199 #define SCM_SUBR_DOC(x) SCM_BOOL_F
201 SCM_API SCM
scm_make_subr (const char *name
, int type
, SCM (*fcn
) ());
202 SCM_API SCM
scm_make_subr_with_generic (const char *name
,
206 SCM_API SCM
scm_make_subr_opt (const char *name
,
211 SCM_API SCM
scm_call_catching_errors (SCM (*thunk
)(), SCM (*err_filter
)(),
214 SCM_API
long scm_make_smob_type_mfpe (char *name
, size_t size
,
216 size_t (*free
) (SCM
),
217 int (*print
) (SCM
, SCM
,
219 SCM (*equalp
) (SCM
, SCM
));
221 SCM_API
void scm_set_smob_mfpe (long tc
,
223 size_t (*free
) (SCM
),
224 int (*print
) (SCM
, SCM
, scm_print_state
*),
225 SCM (*equalp
) (SCM
, SCM
));
227 SCM_API
size_t scm_smob_free (SCM obj
);
229 SCM_API SCM
scm_strprint_obj (SCM obj
);
230 SCM_API SCM
scm_read_0str (char *expr
);
231 SCM_API SCM
scm_eval_0str (const char *expr
);
233 SCM_API
char *scm_i_object_chars (SCM
);
235 #define SCM_CHARS(x) scm_i_object_chars(x)
236 #define SCM_UCHARS(x) ((unsigned char *)SCM_CHARS(x))
238 SCM_API
long scm_i_object_length (SCM
);
240 #define SCM_LENGTH(x) scm_i_object_length(x)
242 #define scm_strhash(str, len, n) (scm_string_hash ((str), (len)) % (n))
244 SCM_API SCM
scm_sym2ovcell_soft (SCM sym
, SCM obarray
);
245 SCM_API SCM
scm_sym2ovcell (SCM sym
, SCM obarray
);
246 SCM_API SCM
scm_intern_obarray_soft (const char *name
, size_t len
,
247 SCM obarray
, unsigned int softness
);
248 SCM_API SCM
scm_intern_obarray (const char *name
, size_t len
, SCM obarray
);
249 SCM_API SCM
scm_symbol_value0 (const char *name
);
251 SCM_API SCM
scm_string_to_obarray_symbol (SCM o
, SCM s
, SCM softp
);
252 SCM_API SCM
scm_intern_symbol (SCM o
, SCM s
);
253 SCM_API SCM
scm_unintern_symbol (SCM o
, SCM s
);
254 SCM_API SCM
scm_symbol_binding (SCM o
, SCM s
);
256 /* This name has been reused for real uninterned symbols. */
257 SCM_API SCM
scm_symbol_interned_p (SCM o
, SCM s
);
259 SCM_API SCM
scm_symbol_bound_p (SCM o
, SCM s
);
260 SCM_API SCM
scm_symbol_set_x (SCM o
, SCM s
, SCM v
);
262 SCM_API SCM
scm_gentemp (SCM prefix
, SCM obarray
);
264 #define SCM_OPDIRP(x) (SCM_DIRP (x) && (SCM_DIR_OPEN_P (x)))
265 #define scm_fport scm_t_fport
266 #define scm_option scm_t_option
267 #define scm_srcprops scm_t_srcprops
268 #define scm_srcprops_chunk scm_t_srcprops_chunk
269 #define scm_info_frame scm_t_info_frame
270 #define scm_stack scm_t_stack
271 #define scm_array scm_t_array
272 #define scm_array_dim scm_t_array_dim
273 #define SCM_ARRAY_CONTIGUOUS SCM_ARRAY_FLAG_CONTIGUOUS
274 #define SCM_FUNC_NAME (scm_makfrom0str (FUNC_NAME))
276 #define SCM_WTA(pos, scm) \
277 do { scm_wta (scm, (char *) pos, FUNC_NAME); } while (0)
279 #define RETURN_SCM_WTA(pos, scm) \
280 do { return scm_wta (scm, (char *) pos, FUNC_NAME); } while (0)
282 #define SCM_VALIDATE_NUMBER_COPY(pos, z, cvar) \
284 if (SCM_I_INUMP (z)) \
285 cvar = (double) SCM_I_INUM (z); \
286 else if (SCM_REALP (z)) \
287 cvar = SCM_REAL_VALUE (z); \
288 else if (SCM_BIGP (z)) \
289 cvar = scm_i_big2dbl (z); \
293 SCM_WRONG_TYPE_ARG (pos, z); \
297 #define SCM_VALIDATE_NUMBER_DEF_COPY(pos, number, def, cvar) \
299 if (SCM_UNBNDP (number)) \
302 SCM_VALIDATE_NUMBER_COPY(pos, number, cvar); \
305 #define SCM_VALIDATE_OPDIR(pos, port) SCM_MAKE_VALIDATE (pos, port, OPDIRP)
307 /* Deprecated because we can not safely cast a SCM* to a scm_t_bits*
310 #define SCM_CELL_WORD_LOC(x, n) ((scm_t_bits*)SCM_CELL_OBJECT_LOC((x),(n)))
312 /* Users shouldn't know about INUMs.
315 SCM_API SCM
scm_i_makinum (scm_t_signed_bits val
);
316 SCM_API
int scm_i_inump (SCM obj
);
317 SCM_API scm_t_signed_bits
scm_i_inum (SCM obj
);
319 #define SCM_MAKINUM(x) scm_i_makinum(x)
320 #define SCM_INUM(x) scm_i_inum(x)
321 #define SCM_INUMP(x) scm_i_inump(x)
322 #define SCM_NINUMP(x) (!SCM_INUMP(x))
324 #define SCM_VALIDATE_INUM(pos, k) SCM_MAKE_VALIDATE_MSG (pos, k, INUMP, "exact integer")
326 #define SCM_VALIDATE_INUM_COPY(pos, k, cvar) \
328 SCM_ASSERT (SCM_I_INUMP (k), k, pos, FUNC_NAME); \
329 cvar = SCM_I_INUM (k); \
332 #define SCM_VALIDATE_BIGINT(pos, k) SCM_MAKE_VALIDATE_MSG (pos, k, BIGP, "bignum")
334 #define SCM_VALIDATE_INUM_MIN(pos, k, min) \
336 SCM_ASSERT (SCM_I_INUMP(k), k, pos, FUNC_NAME); \
337 SCM_ASSERT_RANGE (pos, k, (SCM_I_INUM (k) >= min)); \
340 #define SCM_VALIDATE_INUM_MIN_COPY(pos, k, min, cvar) \
342 SCM_ASSERT (SCM_I_INUMP (k), k, pos, FUNC_NAME); \
343 SCM_ASSERT_RANGE (pos, k, (SCM_I_INUM (k) >= min)); \
344 cvar = SCM_INUM (k); \
347 #define SCM_VALIDATE_INUM_MIN_DEF_COPY(pos, k, min, default, cvar) \
349 if (SCM_UNBNDP (k)) \
350 k = SCM_I_MAKINUM (default); \
351 SCM_ASSERT (SCM_I_INUMP (k), k, pos, FUNC_NAME); \
352 SCM_ASSERT_RANGE (pos, k, (SCM_I_INUM (k) >= min)); \
353 cvar = SCM_INUM (k); \
356 #define SCM_VALIDATE_INUM_DEF(pos, k, default) \
358 if (SCM_UNBNDP (k)) \
359 k = SCM_I_MAKINUM (default); \
360 else SCM_ASSERT (SCM_I_INUMP (k), k, pos, FUNC_NAME); \
363 #define SCM_VALIDATE_INUM_DEF_COPY(pos, k, default, cvar) \
365 if (SCM_UNBNDP (k)) \
367 k = SCM_I_MAKINUM (default); \
372 SCM_ASSERT (SCM_I_INUMP (k), k, pos, FUNC_NAME); \
373 cvar = SCM_INUM (k); \
378 #define SCM_VALIDATE_INUM_RANGE(pos, k, low, high) \
379 do { SCM_ASSERT(SCM_I_INUMP(k), k, pos, FUNC_NAME); \
380 SCM_ASSERT_RANGE(pos, k, \
381 (SCM_I_INUM (k) >= low && \
382 SCM_I_INUM (k) < high)); \
385 #define SCM_VALIDATE_INUM_RANGE_COPY(pos, k, low, high, cvar) \
387 SCM_ASSERT (SCM_INUMP (k), k, pos, FUNC_NAME); \
388 SCM_ASSERT_RANGE (pos, k, low <= SCM_INUM (k) && SCM_INUM (k) < high); \
389 cvar = SCM_INUM (k); \
392 #define SCM_STRING_COERCE_0TERMINATION_X(x) (x)
394 /* XXX - buggy interface, STR might not be large enough.
396 Converts the given Scheme string OBJ into a C string, containing a copy
397 of OBJ's content with a trailing null byte. If LENP is non-NULL, set
398 *LENP to the string's length.
400 When STR is non-NULL it receives the copy and is returned by the function,
401 otherwise new memory is allocated and the caller is responsible for
402 freeing it via free(). If out of memory, NULL is returned.
404 Note that Scheme strings may contain arbitrary data, including null
405 characters. This means that null termination is not a reliable way to
406 determine the length of the returned value. However, the function always
407 copies the complete contents of OBJ, and sets *LENP to the length of the
408 scheme string (if LENP is non-null).
410 SCM_API
char *scm_c_string2str (SCM obj
, char *str
, size_t *lenp
);
412 /* XXX - buggy interface, you don't know how many bytes have been copied.
414 Copy LEN characters at START from the Scheme string OBJ to memory
415 at STR. START is an index into OBJ; zero means the beginning of
416 the string. STR has already been allocated by the caller.
418 If START + LEN is off the end of OBJ, silently truncate the source
419 region to fit the string. If truncation occurs, the corresponding
420 area of STR is left unchanged.
422 SCM_API
char *scm_c_substring2str (SCM obj
, char *str
, size_t start
, size_t len
);
424 SCM_API
char *scm_c_symbol2str (SCM obj
, char *str
, size_t *lenp
);
426 /* Deprecated because the names belong to what is now
427 scm_truncate_number and scm_round_number.
429 SCM_API
double scm_truncate (double x
);
430 SCM_API
double scm_round (double x
);
432 /* Deprecated because we don't want people to access the internal
433 representation of strings directly.
436 #define SCM_VALIDATE_STRING_COPY(pos, str, cvar) \
438 SCM_ASSERT (SCM_STRINGP (str), str, pos, FUNC_NAME); \
439 cvar = SCM_STRING_CHARS(str); \
442 /* validate a string and optional start/end arguments which default to
443 0/string-len. this is unrelated to the old shared substring
444 support, so please do not deprecate it :) */
445 #define SCM_VALIDATE_SUBSTRING_SPEC_COPY(pos_str, str, c_str, \
446 pos_start, start, c_start,\
447 pos_end, end, c_end) \
449 SCM_VALIDATE_STRING_COPY (pos_str, str, c_str);\
450 c_start = SCM_UNBNDP(start)? 0 : scm_to_size_t (start);\
451 c_end = SCM_UNBNDP(end)? SCM_STRING_LENGTH(str) : scm_to_size_t (end);\
452 SCM_ASSERT_RANGE (pos_start, start,\
454 && (size_t) c_start <= SCM_STRING_LENGTH (str));\
455 SCM_ASSERT_RANGE (pos_end, end,\
457 && (size_t) c_end <= SCM_STRING_LENGTH (str));\
460 /* Deprecated because we don't want people to access the internals of
464 SCM_API
char *scm_i_deprecated_symbol_chars (SCM sym
);
465 SCM_API
size_t scm_i_deprecated_symbol_length (SCM sym
);
467 #define SCM_SYMBOL_CHARS(x) scm_i_deprecated_symbol_chars(x)
468 #define SCM_SYMBOL_LENGTH(x) scm_i_deprecated_symbol_length(x)
470 /* Deprecated because the macros used to evaluate the arguments more
471 than once and because the symbol of a keyword now has no dash.
474 SCM_API
int scm_i_keywordp (SCM obj
);
475 SCM_API SCM
scm_i_keywordsym (SCM keyword
);
477 #define SCM_KEYWORDP(x) scm_i_keywordp(x)
478 #define SCM_KEYWORDSYM(x) scm_i_keywordsym(x)
480 /* Deprecated because we don't want to hand out unprotected pointers
481 to arrays, vectors, etc. */
483 #define SCM_VECTOR_MAX_LENGTH ((1L << 24) - 1)
485 SCM_API
int scm_i_vectorp (SCM x
);
486 SCM_API
unsigned long scm_i_vector_length (SCM x
);
487 SCM_API
const SCM
*scm_i_velts (SCM x
);
488 SCM_API SCM
*scm_i_writable_velts (SCM x
);
489 SCM_API SCM
scm_i_vector_ref (SCM x
, size_t idx
);
490 SCM_API
void scm_i_vector_set (SCM x
, size_t idx
, SCM val
);
491 SCM_API SCM
scm_vector_equal_p (SCM x
, SCM y
);
493 #define SCM_VECTORP(x) scm_i_vectorp(x)
494 #define SCM_VECTOR_LENGTH(x) scm_i_vector_length(x)
495 #define SCM_VELTS(x) scm_i_velts(x)
496 #define SCM_WRITABLE_VELTS(x) scm_i_writable_velts(x)
497 #define SCM_VECTOR_REF(x,y) scm_i_vector_ref(x,y)
498 #define SCM_VECTOR_SET(x,y,z) scm_i_vector_set(x,y,z)
500 typedef scm_i_t_array scm_t_array
;
502 SCM_API
int scm_i_arrayp (SCM a
);
503 SCM_API
size_t scm_i_array_ndim (SCM a
);
504 SCM_API
int scm_i_array_contp (SCM a
);
505 SCM_API scm_t_array
*scm_i_array_mem (SCM a
);
506 SCM_API SCM
scm_i_array_v (SCM a
);
507 SCM_API
size_t scm_i_array_base (SCM a
);
508 SCM_API scm_t_array_dim
*scm_i_array_dims (SCM a
);
510 #define SCM_ARRAYP(a) scm_i_arrayp(a)
511 #define SCM_ARRAY_NDIM(a) scm_i_array_ndim(a)
512 #define SCM_ARRAY_CONTP(a) scm_i_array_contp(a)
513 #define SCM_ARRAY_MEM(a) scm_i_array_mem(a)
514 #define SCM_ARRAY_V(a) scm_i_array_v(a)
515 #define SCM_ARRAY_BASE(a) scm_i_array_base(a)
516 #define SCM_ARRAY_DIMS(a) scm_i_array_dims(a)
518 /* Deprecated because they should not be lvalues and we want people to
519 use the official interfaces.
522 #define scm_cur_inp scm_i_cur_inp ()
523 #define scm_cur_outp scm_i_cur_outp ()
524 #define scm_cur_errp scm_i_cur_errp ()
525 #define scm_cur_loadp scm_i_cur_loadp ()
526 #define scm_progargs scm_i_progargs ()
527 #define scm_dynwinds scm_i_deprecated_dynwinds ()
528 #define scm_last_debug_frame scm_i_deprecated_last_debug_frame ()
529 #define scm_stack_base scm_i_stack_base ()
531 SCM_API SCM
scm_i_cur_inp (void);
532 SCM_API SCM
scm_i_cur_outp (void);
533 SCM_API SCM
scm_i_cur_errp (void);
534 SCM_API SCM
scm_i_cur_loadp (void);
535 SCM_API SCM
scm_i_progargs (void);
536 SCM_API SCM
scm_i_deprecated_dynwinds (void);
537 SCM_API scm_t_debug_frame
*scm_i_deprecated_last_debug_frame (void);
538 SCM_API SCM_STACKITEM
*scm_i_stack_base (void);
540 /* Deprecated because it evaluates its argument twice.
542 #define SCM_FLUIDP(x) scm_i_fluidp (x)
543 SCM_API
int scm_i_fluidp (SCM x
);
545 /* In the old days, SCM_CRITICAL_SECTION_START stopped signal handlers
546 from running, since in those days the handler directly ran scheme
547 code, and that had to be avoided when the heap was not in a
548 consistent state etc. And since the scheme code could do a stack
549 swapping new continuation etc, signals had to be deferred around
550 various C library functions which were not safe or not known to be
551 safe to swap away, which was a lot of stuff.
553 These days signals are implemented with asyncs and don't directly
554 run scheme code in the handler, but hold it until an SCM_TICK etc
555 where it will be safe. This means interrupt protection is not
556 needed and SCM_CRITICAL_SECTION_START / SCM_CRITICAL_SECTION_END is
557 something of an anachronism.
559 What past SCM_CRITICAL_SECTION_START usage also did though was
560 indicate code that was not reentrant, ie. could not be reentered by
561 signal handler code. The present definitions are a mutex lock,
562 affording that reentrancy protection against the new guile 1.8
563 free-running posix threads.
565 One big problem with the present defintions though is that code which
566 throws an error from within a DEFER/ALLOW region will leave the
567 defer_mutex locked and hence hang other threads that attempt to enter a
568 similar DEFER/ALLOW region.
571 SCM_API
void scm_i_defer_ints_etc (void);
572 #define SCM_DEFER_INTS scm_i_defer_ints_etc ()
573 #define SCM_ALLOW_INTS scm_i_defer_ints_etc ()
574 #define SCM_REDEFER_INTS scm_i_defer_ints_etc ()
575 #define SCM_REALLOW_INTS scm_i_defer_ints_etc ()
577 /* Deprecated since they are unnecessary and had not been documented.
579 SCM_API SCM
scm_guard (SCM guardian
, SCM obj
, int throw_p
);
580 SCM_API SCM
scm_get_one_zombie (SCM guardian
);
582 /* Deprecated since guardians no longer have these special features.
584 SCM_API SCM
scm_destroy_guardian_x (SCM guardian
);
585 SCM_API SCM
scm_guardian_greedy_p (SCM guardian
);
586 SCM_API SCM
scm_guardian_destroyed_p (SCM guardian
);
589 /* GC-related things deprecated with the move to BDW-GC starting from 1.9.3
592 SCM_API
unsigned long scm_mallocated
;
593 SCM_API
unsigned long scm_mtrigger
;
595 SCM_API
size_t scm_max_segment_size
;
597 #if defined (GUILE_DEBUG) || defined (GUILE_DEBUG_FREELIST)
598 SCM_API SCM
scm_map_free_list (void);
601 #if defined (GUILE_DEBUG_FREELIST)
602 SCM_API SCM
scm_gc_set_debug_check_freelist_x (SCM flag
);
607 void scm_i_init_deprecated (void);
611 #endif /* SCM_DEPRECATED_H */