1 /* This file contains definitions for deprecated features. When you
2 deprecate something, move it here when that is feasible.
5 /* Copyright (C) 2003, 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
7 * This library is free software; you can redistribute it and/or
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.
12 * This library is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
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
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
27 #define SCM_BUILDING_DEPRECATED_CODE
29 #include "libguile/_scm.h"
30 #include "libguile/async.h"
31 #include "libguile/deprecated.h"
32 #include "libguile/discouraged.h"
33 #include "libguile/deprecation.h"
34 #include "libguile/snarf.h"
35 #include "libguile/validate.h"
36 #include "libguile/strings.h"
37 #include "libguile/srfi-13.h"
38 #include "libguile/modules.h"
39 #include "libguile/generalized-arrays.h"
40 #include "libguile/eval.h"
41 #include "libguile/smob.h"
42 #include "libguile/procprop.h"
43 #include "libguile/vectors.h"
44 #include "libguile/hashtab.h"
45 #include "libguile/struct.h"
46 #include "libguile/variable.h"
47 #include "libguile/fluids.h"
48 #include "libguile/ports.h"
49 #include "libguile/eq.h"
50 #include "libguile/read.h"
51 #include "libguile/strports.h"
52 #include "libguile/smob.h"
53 #include "libguile/alist.h"
54 #include "libguile/keywords.h"
55 #include "libguile/socket.h"
56 #include "libguile/feature.h"
61 #include <arpa/inet.h>
63 #if (SCM_ENABLE_DEPRECATED == 1)
65 /* From print.c: Internal symbol names of isyms. Deprecated in guile 1.7.0 on
67 char *scm_isymnames
[] =
73 SCM_REGISTER_PROC(s_substring_move_left_x
, "substring-move-left!", 5, 0, 0, scm_substring_move_x
);
75 SCM_REGISTER_PROC(s_substring_move_right_x
, "substring-move-right!", 5, 0, 0, scm_substring_move_x
);
78 scm_wta (SCM arg
, const char *pos
, const char *s_subr
)
80 if (!s_subr
|| !*s_subr
)
82 if ((~0x1fL
) & (long) pos
)
84 /* error string supplied. */
85 scm_misc_error (s_subr
, pos
, scm_list_1 (arg
));
89 /* numerical error code. */
90 scm_t_bits error
= (scm_t_bits
) pos
;
95 scm_wrong_type_arg (s_subr
, 0, arg
);
97 scm_wrong_type_arg (s_subr
, 1, arg
);
99 scm_wrong_type_arg (s_subr
, 2, arg
);
101 scm_wrong_type_arg (s_subr
, 3, arg
);
103 scm_wrong_type_arg (s_subr
, 4, arg
);
105 scm_wrong_type_arg (s_subr
, 5, arg
);
107 scm_wrong_type_arg (s_subr
, 6, arg
);
109 scm_wrong_type_arg (s_subr
, 7, arg
);
111 scm_wrong_num_args (arg
);
113 scm_out_of_range (s_subr
, arg
);
115 scm_memory_error (s_subr
);
117 /* this shouldn't happen. */
118 scm_misc_error (s_subr
, "Unknown error", SCM_EOL
);
121 return SCM_UNSPECIFIED
;
127 /* We can't use SCM objects here. One should be able to call
128 SCM_REGISTER_MODULE from a C++ constructor for a static
129 object. This happens before main and thus before libguile is
133 struct moddata
*link
;
138 static struct moddata
*registered_mods
= NULL
;
141 scm_register_module_xxx (char *module_name
, void *init_func
)
145 scm_c_issue_deprecation_warning
146 ("`scm_register_module_xxx' is deprecated. Use extensions instead.");
148 /* XXX - should we (and can we) DEFER_INTS here? */
150 for (md
= registered_mods
; md
; md
= md
->link
)
151 if (!strcmp (md
->module_name
, module_name
))
153 md
->init_func
= init_func
;
157 md
= (struct moddata
*) malloc (sizeof (struct moddata
));
161 "guile: can't register module (%s): not enough memory",
166 md
->module_name
= module_name
;
167 md
->init_func
= init_func
;
168 md
->link
= registered_mods
;
169 registered_mods
= md
;
172 SCM_DEFINE (scm_registered_modules
, "c-registered-modules", 0, 0, 0,
174 "Return a list of the object code modules that have been imported into\n"
175 "the current Guile process. Each element of the list is a pair whose\n"
176 "car is the name of the module, and whose cdr is the function handle\n"
177 "for that module's initializer function. The name is the string that\n"
178 "has been passed to scm_register_module_xxx.")
179 #define FUNC_NAME s_scm_registered_modules
185 for (md
= registered_mods
; md
; md
= md
->link
)
186 res
= scm_cons (scm_cons (scm_from_locale_string (md
->module_name
),
187 scm_from_ulong ((unsigned long) md
->init_func
)),
193 SCM_DEFINE (scm_clear_registered_modules
, "c-clear-registered-modules", 0, 0, 0,
195 "Destroy the list of modules registered with the current Guile process.\n"
196 "The return value is unspecified. @strong{Warning:} this function does\n"
197 "not actually unlink or deallocate these modules, but only destroys the\n"
198 "records of which modules have been loaded. It should therefore be used\n"
199 "only by module bookkeeping operations.")
200 #define FUNC_NAME s_scm_clear_registered_modules
202 struct moddata
*md1
, *md2
;
204 SCM_CRITICAL_SECTION_START
;
206 for (md1
= registered_mods
; md1
; md1
= md2
)
211 registered_mods
= NULL
;
213 SCM_CRITICAL_SECTION_END
;
214 return SCM_UNSPECIFIED
;
219 scm_remember (SCM
*ptr
)
221 scm_c_issue_deprecation_warning ("`scm_remember' is deprecated. "
222 "Use the `scm_remember_upto_here*' family of functions instead.");
226 scm_protect_object (SCM obj
)
228 scm_c_issue_deprecation_warning ("`scm_protect_object' is deprecated. "
229 "Use `scm_gc_protect_object' instead.");
230 return scm_gc_protect_object (obj
);
234 scm_unprotect_object (SCM obj
)
236 scm_c_issue_deprecation_warning ("`scm_unprotect_object' is deprecated. "
237 "Use `scm_gc_unprotect_object' instead.");
238 return scm_gc_unprotect_object (obj
);
241 SCM_SYMBOL (scm_sym_app
, "app");
242 SCM_SYMBOL (scm_sym_modules
, "modules");
243 static SCM module_prefix
= SCM_BOOL_F
;
244 static SCM make_modules_in_var
;
245 static SCM beautify_user_module_x_var
;
246 static SCM try_module_autoload_var
;
251 #define PERM(x) scm_permanent_object(x)
253 if (module_prefix
== SCM_BOOL_F
)
255 module_prefix
= PERM (scm_list_2 (scm_sym_app
, scm_sym_modules
));
256 make_modules_in_var
= PERM (scm_c_lookup ("make-modules-in"));
257 beautify_user_module_x_var
=
258 PERM (scm_c_lookup ("beautify-user-module!"));
259 try_module_autoload_var
= PERM (scm_c_lookup ("try-module-autoload"));
264 scm_module_full_name (SCM name
)
266 init_module_stuff ();
267 if (scm_is_eq (SCM_CAR (name
), scm_sym_app
))
270 return scm_append (scm_list_2 (module_prefix
, name
));
274 scm_make_module (SCM name
)
276 init_module_stuff ();
277 scm_c_issue_deprecation_warning ("`scm_make_module' is deprecated. "
278 "Use `scm_c_define_module instead.");
280 return scm_call_2 (SCM_VARIABLE_REF (make_modules_in_var
),
281 scm_the_root_module (),
282 scm_module_full_name (name
));
286 scm_ensure_user_module (SCM module
)
288 init_module_stuff ();
289 scm_c_issue_deprecation_warning ("`scm_ensure_user_module' is deprecated. "
290 "Use `scm_c_define_module instead.");
292 scm_call_1 (SCM_VARIABLE_REF (beautify_user_module_x_var
), module
);
293 return SCM_UNSPECIFIED
;
297 scm_load_scheme_module (SCM name
)
299 init_module_stuff ();
300 scm_c_issue_deprecation_warning ("`scm_load_scheme_module' is deprecated. "
301 "Use `scm_c_resolve_module instead.");
303 return scm_call_1 (SCM_VARIABLE_REF (try_module_autoload_var
), name
);
306 /* This is implemented in C solely for SCM_COERCE_OUTPORT ... */
309 maybe_close_port (void *data
, SCM port
)
311 SCM except_set
= (SCM
) data
;
313 while (!scm_is_null (except_set
))
315 SCM p
= SCM_COERCE_OUTPORT (SCM_CAR (except_set
));
316 if (scm_is_eq (p
, port
))
318 except_set
= SCM_CDR (except_set
);
321 scm_close_port (port
);
324 SCM_DEFINE (scm_close_all_ports_except
, "close-all-ports-except", 0, 0, 1,
326 "[DEPRECATED] Close all open file ports used by the interpreter\n"
327 "except for those supplied as arguments. This procedure\n"
328 "was intended to be used before an exec call to close file descriptors\n"
329 "which are not needed in the new process. However it has the\n"
330 "undesirable side effect of flushing buffers, so it's deprecated.\n"
331 "Use port-for-each instead.")
332 #define FUNC_NAME s_scm_close_all_ports_except
335 SCM_VALIDATE_REST_ARGUMENT (ports
);
337 for (p
= ports
; !scm_is_null (p
); p
= SCM_CDR (p
))
338 SCM_VALIDATE_OPPORT (SCM_ARG1
, SCM_COERCE_OUTPORT (SCM_CAR (p
)));
340 scm_c_port_for_each (maybe_close_port
, ports
);
342 return SCM_UNSPECIFIED
;
346 SCM_DEFINE (scm_variable_set_name_hint
, "variable-set-name-hint!", 2, 0, 0,
348 "Do not use this function.")
349 #define FUNC_NAME s_scm_variable_set_name_hint
351 SCM_VALIDATE_VARIABLE (1, var
);
352 SCM_VALIDATE_SYMBOL (2, hint
);
353 scm_c_issue_deprecation_warning
354 ("'variable-set-name-hint!' is deprecated. Do not use it.");
355 return SCM_UNSPECIFIED
;
359 SCM_DEFINE (scm_builtin_variable
, "builtin-variable", 1, 0, 0,
361 "Do not use this function.")
362 #define FUNC_NAME s_scm_builtin_variable
364 SCM_VALIDATE_SYMBOL (1,name
);
365 scm_c_issue_deprecation_warning ("`builtin-variable' is deprecated. "
366 "Use module system operations instead.");
367 return scm_sym2var (name
, SCM_BOOL_F
, SCM_BOOL_T
);
372 scm_makstr (size_t len
, int dummy
)
374 scm_c_issue_deprecation_warning
375 ("'scm_makstr' is deprecated. Use 'scm_c_make_string' instead.");
376 return scm_c_make_string (len
, SCM_UNDEFINED
);
380 scm_makfromstr (const char *src
, size_t len
, int dummy SCM_UNUSED
)
382 scm_c_issue_deprecation_warning ("`scm_makfromstr' is deprecated. "
383 "Use `scm_from_locale_stringn' instead.");
385 return scm_from_locale_stringn (src
, len
);
389 scm_internal_with_fluids (SCM fluids
, SCM values
, SCM (*cproc
) (), void *cdata
)
391 scm_c_issue_deprecation_warning ("`scm_internal_with_fluids' is deprecated. "
392 "Use `scm_c_with_fluids' instead.");
394 return scm_c_with_fluids (fluids
, values
, cproc
, cdata
);
398 scm_make_gsubr (const char *name
, int req
, int opt
, int rst
, SCM (*fcn
)())
400 scm_c_issue_deprecation_warning
401 ("`scm_make_gsubr' is deprecated. Use `scm_c_define_gsubr' instead.");
403 return scm_c_define_gsubr (name
, req
, opt
, rst
, fcn
);
407 scm_make_gsubr_with_generic (const char *name
,
408 int req
, int opt
, int rst
,
409 SCM (*fcn
)(), SCM
*gf
)
411 scm_c_issue_deprecation_warning
412 ("`scm_make_gsubr_with_generic' is deprecated. "
413 "Use `scm_c_define_gsubr_with_generic' instead.");
415 return scm_c_define_gsubr_with_generic (name
, req
, opt
, rst
, fcn
, gf
);
419 scm_create_hook (const char *name
, int n_args
)
421 scm_c_issue_deprecation_warning
422 ("'scm_create_hook' is deprecated. "
423 "Use 'scm_make_hook' and 'scm_c_define' instead.");
425 SCM hook
= scm_make_hook (scm_from_int (n_args
));
426 scm_c_define (name
, hook
);
427 return scm_permanent_object (hook
);
431 SCM_DEFINE (scm_sloppy_memq
, "sloppy-memq", 2, 0, 0,
433 "This procedure behaves like @code{memq}, but does no type or error checking.\n"
434 "Its use is recommended only in writing Guile internals,\n"
435 "not for high-level Scheme programs.")
436 #define FUNC_NAME s_scm_sloppy_memq
438 scm_c_issue_deprecation_warning
439 ("'sloppy-memq' is deprecated. Use 'memq' instead.");
441 for(; scm_is_pair (lst
); lst
= SCM_CDR(lst
))
443 if (scm_is_eq (SCM_CAR (lst
), x
))
451 SCM_DEFINE (scm_sloppy_memv
, "sloppy-memv", 2, 0, 0,
453 "This procedure behaves like @code{memv}, but does no type or error checking.\n"
454 "Its use is recommended only in writing Guile internals,\n"
455 "not for high-level Scheme programs.")
456 #define FUNC_NAME s_scm_sloppy_memv
458 scm_c_issue_deprecation_warning
459 ("'sloppy-memv' is deprecated. Use 'memv' instead.");
461 for(; scm_is_pair (lst
); lst
= SCM_CDR(lst
))
463 if (! scm_is_false (scm_eqv_p (SCM_CAR (lst
), x
)))
471 SCM_DEFINE (scm_sloppy_member
, "sloppy-member", 2, 0, 0,
473 "This procedure behaves like @code{member}, but does no type or error checking.\n"
474 "Its use is recommended only in writing Guile internals,\n"
475 "not for high-level Scheme programs.")
476 #define FUNC_NAME s_scm_sloppy_member
478 scm_c_issue_deprecation_warning
479 ("'sloppy-member' is deprecated. Use 'member' instead.");
481 for(; scm_is_pair (lst
); lst
= SCM_CDR(lst
))
483 if (! scm_is_false (scm_equal_p (SCM_CAR (lst
), x
)))
490 SCM_SYMBOL (scm_end_of_file_key
, "end-of-file");
492 SCM_DEFINE (scm_read_and_eval_x
, "read-and-eval!", 0, 1, 0,
494 "Read a form from @var{port} (standard input by default), and evaluate it\n"
495 "(memoizing it in the process) in the top-level environment. If no data\n"
496 "is left to be read from @var{port}, an @code{end-of-file} error is\n"
498 #define FUNC_NAME s_scm_read_and_eval_x
502 scm_c_issue_deprecation_warning
503 ("'read-and-eval!' is deprecated. Use 'read' and 'eval' instead.");
505 form
= scm_read (port
);
506 if (SCM_EOF_OBJECT_P (form
))
507 scm_ithrow (scm_end_of_file_key
, SCM_EOL
, 1);
508 return scm_eval_x (form
, scm_current_module ());
513 scm_make_subr_opt (const char *name
, int type
, SCM (*fcn
) (), int set
)
515 scm_c_issue_deprecation_warning
516 ("`scm_make_subr_opt' is deprecated. Use `scm_c_make_subr' or "
517 "`scm_c_define_subr' instead.");
520 return scm_c_define_subr (name
, type
, fcn
);
522 return scm_c_make_subr (name
, type
, fcn
);
526 scm_make_subr (const char *name
, int type
, SCM (*fcn
) ())
528 scm_c_issue_deprecation_warning
529 ("`scm_make_subr' is deprecated. Use `scm_c_define_subr' instead.");
531 return scm_c_define_subr (name
, type
, fcn
);
535 scm_make_subr_with_generic (const char *name
, int type
, SCM (*fcn
) (), SCM
*gf
)
537 scm_c_issue_deprecation_warning
538 ("`scm_make_subr_with_generic' is deprecated. Use "
539 "`scm_c_define_subr_with_generic' instead.");
541 return scm_c_define_subr_with_generic (name
, type
, fcn
, gf
);
544 /* Call thunk(closure) underneath a top-level error handler.
545 * If an error occurs, pass the exitval through err_filter and return it.
546 * If no error occurs, return the value of thunk.
550 typedef int setjmp_type
;
552 typedef long setjmp_type
;
555 struct cce_handler_data
{
556 SCM (*err_filter
) ();
561 invoke_err_filter (void *d
, SCM tag
, SCM args
)
563 struct cce_handler_data
*data
= (struct cce_handler_data
*)d
;
564 return data
->err_filter (SCM_BOOL_F
, data
->closure
);
568 scm_call_catching_errors (SCM (*thunk
)(), SCM (*err_filter
)(), void *closure
)
570 scm_c_issue_deprecation_warning
571 ("'scm_call_catching_errors' is deprecated. "
572 "Use 'scm_internal_catch' instead.");
575 struct cce_handler_data data
;
576 data
.err_filter
= err_filter
;
577 data
.closure
= closure
;
578 return scm_internal_catch (SCM_BOOL_T
,
579 (scm_t_catch_body
)thunk
, closure
,
580 (scm_t_catch_handler
)invoke_err_filter
, &data
);
585 scm_make_smob_type_mfpe (char *name
, size_t size
,
587 size_t (*free
) (SCM
),
588 int (*print
) (SCM
, SCM
, scm_print_state
*),
589 SCM (*equalp
) (SCM
, SCM
))
591 scm_c_issue_deprecation_warning
592 ("'scm_make_smob_type_mfpe' is deprecated. "
593 "Use 'scm_make_smob_type' plus 'scm_set_smob_*' instead.");
596 long answer
= scm_make_smob_type (name
, size
);
597 scm_set_smob_mfpe (answer
, mark
, free
, print
, equalp
);
603 scm_set_smob_mfpe (long tc
,
605 size_t (*free
) (SCM
),
606 int (*print
) (SCM
, SCM
, scm_print_state
*),
607 SCM (*equalp
) (SCM
, SCM
))
609 scm_c_issue_deprecation_warning
610 ("'scm_set_smob_mfpe' is deprecated. "
611 "Use 'scm_set_smob_mark' instead, for example.");
613 if (mark
) scm_set_smob_mark (tc
, mark
);
614 if (free
) scm_set_smob_free (tc
, free
);
615 if (print
) scm_set_smob_print (tc
, print
);
616 if (equalp
) scm_set_smob_equalp (tc
, equalp
);
620 scm_smob_free (SCM obj
)
622 long n
= SCM_SMOBNUM (obj
);
624 scm_c_issue_deprecation_warning
625 ("`scm_smob_free' is deprecated. "
626 "It is no longer needed.");
628 if (scm_smobs
[n
].size
> 0)
629 scm_gc_free ((void *) SCM_CELL_WORD_1 (obj
),
630 scm_smobs
[n
].size
, SCM_SMOBNAME (n
));
635 scm_read_0str (char *expr
)
637 scm_c_issue_deprecation_warning
638 ("scm_read_0str is deprecated. Use scm_c_read_string instead.");
640 return scm_c_read_string (expr
);
644 scm_eval_0str (const char *expr
)
646 scm_c_issue_deprecation_warning
647 ("scm_eval_0str is deprecated. Use scm_c_eval_string instead.");
649 return scm_c_eval_string (expr
);
653 scm_strprint_obj (SCM obj
)
655 scm_c_issue_deprecation_warning
656 ("scm_strprint_obj is deprecated. Use scm_object_to_string instead.");
657 return scm_object_to_string (obj
, SCM_UNDEFINED
);
661 scm_i_object_chars (SCM obj
)
663 scm_c_issue_deprecation_warning
664 ("SCM_CHARS is deprecated. See the manual for alternatives.");
665 if (SCM_STRINGP (obj
))
666 return SCM_STRING_CHARS (obj
);
667 if (SCM_SYMBOLP (obj
))
668 return SCM_SYMBOL_CHARS (obj
);
673 scm_i_object_length (SCM obj
)
675 scm_c_issue_deprecation_warning
676 ("SCM_LENGTH is deprecated. "
677 "Use scm_c_string_length instead, for example, or see the manual.");
678 if (SCM_STRINGP (obj
))
679 return SCM_STRING_LENGTH (obj
);
680 if (SCM_SYMBOLP (obj
))
681 return SCM_SYMBOL_LENGTH (obj
);
682 if (SCM_VECTORP (obj
))
683 return SCM_VECTOR_LENGTH (obj
);
688 scm_sym2ovcell_soft (SCM sym
, SCM obarray
)
691 size_t hash
= scm_i_symbol_hash (sym
) % SCM_VECTOR_LENGTH (obarray
);
693 scm_c_issue_deprecation_warning ("`scm_sym2ovcell_soft' is deprecated. "
694 "Use hashtables instead.");
696 SCM_CRITICAL_SECTION_START
;
697 for (lsym
= SCM_VECTOR_REF (obarray
, hash
);
699 lsym
= SCM_CDR (lsym
))
702 if (scm_is_eq (SCM_CAR (z
), sym
))
704 SCM_CRITICAL_SECTION_END
;
708 SCM_CRITICAL_SECTION_END
;
714 scm_sym2ovcell (SCM sym
, SCM obarray
)
715 #define FUNC_NAME "scm_sym2ovcell"
719 scm_c_issue_deprecation_warning ("`scm_sym2ovcell' is deprecated. "
720 "Use hashtables instead.");
722 answer
= scm_sym2ovcell_soft (sym
, obarray
);
723 if (scm_is_true (answer
))
725 SCM_MISC_ERROR ("uninterned symbol: ~S", scm_list_1 (sym
));
726 return SCM_UNSPECIFIED
; /* not reached */
731 /* Intern a symbol whose name is the LEN characters at NAME in OBARRAY.
733 OBARRAY should be a vector of lists, indexed by the name's hash
734 value, modulo OBARRAY's length. Each list has the form
735 ((SYMBOL . VALUE) ...), where SYMBOL is a symbol, and VALUE is the
736 value associated with that symbol (in the current module? in the
739 To "intern" a symbol means: if OBARRAY already contains a symbol by
740 that name, return its (SYMBOL . VALUE) pair; otherwise, create a
741 new symbol, add the pair (SYMBOL . SCM_UNDEFINED) to the
742 appropriate list of the OBARRAY, and return the pair.
744 If softness is non-zero, don't create a symbol if it isn't already
745 in OBARRAY; instead, just return #f.
747 If OBARRAY is SCM_BOOL_F, create a symbol listed in no obarray and
748 return (SYMBOL . SCM_UNDEFINED). */
752 intern_obarray_soft (SCM symbol
, SCM obarray
, unsigned int softness
)
754 size_t raw_hash
= scm_i_symbol_hash (symbol
);
758 if (scm_is_false (obarray
))
763 return scm_cons (symbol
, SCM_UNDEFINED
);
766 hash
= raw_hash
% SCM_VECTOR_LENGTH (obarray
);
768 for (lsym
= SCM_VECTOR_REF(obarray
, hash
);
769 SCM_NIMP (lsym
); lsym
= SCM_CDR (lsym
))
771 SCM a
= SCM_CAR (lsym
);
773 if (scm_is_eq (z
, symbol
))
783 SCM cell
= scm_cons (symbol
, SCM_UNDEFINED
);
784 SCM slot
= SCM_VECTOR_REF (obarray
, hash
);
786 SCM_VECTOR_SET (obarray
, hash
, scm_cons (cell
, slot
));
794 scm_intern_obarray_soft (const char *name
, size_t len
, SCM obarray
,
795 unsigned int softness
)
797 SCM symbol
= scm_from_locale_symboln (name
, len
);
799 scm_c_issue_deprecation_warning ("`scm_intern_obarray_soft' is deprecated. "
800 "Use hashtables instead.");
802 return intern_obarray_soft (symbol
, obarray
, softness
);
806 scm_intern_obarray (const char *name
,size_t len
,SCM obarray
)
808 scm_c_issue_deprecation_warning ("`scm_intern_obarray' is deprecated. "
809 "Use hashtables instead.");
811 return scm_intern_obarray_soft (name
, len
, obarray
, 0);
814 /* Lookup the value of the symbol named by the nul-terminated string
815 NAME in the current module. */
817 scm_symbol_value0 (const char *name
)
819 scm_c_issue_deprecation_warning ("`scm_symbol_value0' is deprecated. "
820 "Use `scm_lookup' instead.");
822 return scm_variable_ref (scm_c_lookup (name
));
825 SCM_DEFINE (scm_string_to_obarray_symbol
, "string->obarray-symbol", 2, 1, 0,
826 (SCM o
, SCM s
, SCM softp
),
827 "Intern a new symbol in @var{obarray}, a symbol table, with name\n"
829 "If @var{obarray} is @code{#f}, use the default system symbol table. If\n"
830 "@var{obarray} is @code{#t}, the symbol should not be interned in any\n"
831 "symbol table; merely return the pair (@var{symbol}\n"
832 ". @var{#<undefined>}).\n\n"
833 "The @var{soft?} argument determines whether new symbol table entries\n"
834 "should be created when the specified symbol is not already present in\n"
835 "@var{obarray}. If @var{soft?} is specified and is a true value, then\n"
836 "new entries should not be added for symbols not already present in the\n"
837 "table; instead, simply return @code{#f}.")
838 #define FUNC_NAME s_scm_string_to_obarray_symbol
844 SCM_VALIDATE_STRING (2, s
);
845 SCM_ASSERT (scm_is_bool (o
) || SCM_VECTORP (o
), o
, SCM_ARG1
, FUNC_NAME
);
847 scm_c_issue_deprecation_warning ("`string->obarray-symbol' is deprecated. "
848 "Use hashtables instead.");
850 softness
= (!SCM_UNBNDP (softp
) && scm_is_true(softp
));
851 /* iron out some screwy calling conventions */
852 if (scm_is_false (o
))
854 /* nothing interesting to do here. */
855 return scm_string_to_symbol (s
);
857 else if (scm_is_eq (o
, SCM_BOOL_T
))
860 vcell
= intern_obarray_soft (scm_string_to_symbol (s
), o
, softness
);
861 if (scm_is_false (vcell
))
863 answer
= SCM_CAR (vcell
);
868 SCM_DEFINE (scm_intern_symbol
, "intern-symbol", 2, 0, 0,
870 "Add a new symbol to @var{obarray} with name @var{string}, bound to an\n"
871 "unspecified initial value. The symbol table is not modified if a symbol\n"
872 "with this name is already present.")
873 #define FUNC_NAME s_scm_intern_symbol
876 SCM_VALIDATE_SYMBOL (2,s
);
877 if (scm_is_false (o
))
878 return SCM_UNSPECIFIED
;
880 scm_c_issue_deprecation_warning ("`intern-symbol' is deprecated. "
881 "Use hashtables instead.");
883 SCM_VALIDATE_VECTOR (1,o
);
884 hval
= scm_i_symbol_hash (s
) % SCM_VECTOR_LENGTH (o
);
885 /* If the symbol is already interned, simply return. */
886 SCM_CRITICAL_SECTION_START
;
890 for (lsym
= SCM_VECTOR_REF (o
, hval
);
892 lsym
= SCM_CDR (lsym
))
894 sym
= SCM_CAR (lsym
);
895 if (scm_is_eq (SCM_CAR (sym
), s
))
897 SCM_CRITICAL_SECTION_END
;
898 return SCM_UNSPECIFIED
;
901 SCM_VECTOR_SET (o
, hval
,
902 scm_acons (s
, SCM_UNDEFINED
,
903 SCM_VECTOR_REF (o
, hval
)));
905 SCM_CRITICAL_SECTION_END
;
906 return SCM_UNSPECIFIED
;
910 SCM_DEFINE (scm_unintern_symbol
, "unintern-symbol", 2, 0, 0,
912 "Remove the symbol with name @var{string} from @var{obarray}. This\n"
913 "function returns @code{#t} if the symbol was present and @code{#f}\n"
915 #define FUNC_NAME s_scm_unintern_symbol
919 scm_c_issue_deprecation_warning ("`unintern-symbol' is deprecated. "
920 "Use hashtables instead.");
922 SCM_VALIDATE_SYMBOL (2,s
);
923 if (scm_is_false (o
))
925 SCM_VALIDATE_VECTOR (1,o
);
926 hval
= scm_i_symbol_hash (s
) % SCM_VECTOR_LENGTH (o
);
927 SCM_CRITICAL_SECTION_START
;
932 for (lsym
= SCM_VECTOR_REF (o
, hval
), lsym_follow
= SCM_BOOL_F
;
934 lsym_follow
= lsym
, lsym
= SCM_CDR (lsym
))
936 sym
= SCM_CAR (lsym
);
937 if (scm_is_eq (SCM_CAR (sym
), s
))
939 /* Found the symbol to unintern. */
940 if (scm_is_false (lsym_follow
))
941 SCM_VECTOR_SET (o
, hval
, lsym
);
943 SCM_SETCDR (lsym_follow
, SCM_CDR(lsym
));
944 SCM_CRITICAL_SECTION_END
;
949 SCM_CRITICAL_SECTION_END
;
954 SCM_DEFINE (scm_symbol_binding
, "symbol-binding", 2, 0, 0,
956 "Look up in @var{obarray} the symbol whose name is @var{string}, and\n"
957 "return the value to which it is bound. If @var{obarray} is @code{#f},\n"
958 "use the global symbol table. If @var{string} is not interned in\n"
959 "@var{obarray}, an error is signalled.")
960 #define FUNC_NAME s_scm_symbol_binding
964 scm_c_issue_deprecation_warning ("`symbol-binding' is deprecated. "
965 "Use hashtables instead.");
967 SCM_VALIDATE_SYMBOL (2,s
);
968 if (scm_is_false (o
))
969 return scm_variable_ref (scm_lookup (s
));
970 SCM_VALIDATE_VECTOR (1,o
);
971 vcell
= scm_sym2ovcell (s
, o
);
972 return SCM_CDR(vcell
);
977 SCM_DEFINE (scm_symbol_interned_p
, "symbol-interned?", 2, 0, 0,
979 "Return @code{#t} if @var{obarray} contains a symbol with name\n"
980 "@var{string}, and @code{#f} otherwise.")
981 #define FUNC_NAME s_scm_symbol_interned_p
985 scm_c_issue_deprecation_warning ("`symbol-interned?' is deprecated. "
986 "Use hashtables instead.");
988 SCM_VALIDATE_SYMBOL (2,s
);
989 if (scm_is_false (o
))
991 SCM var
= scm_sym2var (s
, SCM_BOOL_F
, SCM_BOOL_F
);
992 if (var
!= SCM_BOOL_F
)
996 SCM_VALIDATE_VECTOR (1,o
);
997 vcell
= scm_sym2ovcell_soft (s
, o
);
998 return (SCM_NIMP(vcell
)
1005 SCM_DEFINE (scm_symbol_bound_p
, "symbol-bound?", 2, 0, 0,
1007 "Return @code{#t} if @var{obarray} contains a symbol with name\n"
1008 "@var{string} bound to a defined value. This differs from\n"
1009 "@var{symbol-interned?} in that the mere mention of a symbol\n"
1010 "usually causes it to be interned; @code{symbol-bound?}\n"
1011 "determines whether a symbol has been given any meaningful\n"
1013 #define FUNC_NAME s_scm_symbol_bound_p
1017 scm_c_issue_deprecation_warning ("`symbol-bound?' is deprecated. "
1018 "Use hashtables instead.");
1020 SCM_VALIDATE_SYMBOL (2,s
);
1021 if (scm_is_false (o
))
1023 SCM var
= scm_sym2var (s
, SCM_BOOL_F
, SCM_BOOL_F
);
1024 if (SCM_VARIABLEP(var
) && !SCM_UNBNDP(SCM_VARIABLE_REF(var
)))
1028 SCM_VALIDATE_VECTOR (1,o
);
1029 vcell
= scm_sym2ovcell_soft (s
, o
);
1030 return scm_from_bool (SCM_NIMP (vcell
) && !SCM_UNBNDP (SCM_CDR (vcell
)));
1035 SCM_DEFINE (scm_symbol_set_x
, "symbol-set!", 3, 0, 0,
1036 (SCM o
, SCM s
, SCM v
),
1037 "Find the symbol in @var{obarray} whose name is @var{string}, and rebind\n"
1038 "it to @var{value}. An error is signalled if @var{string} is not present\n"
1039 "in @var{obarray}.")
1040 #define FUNC_NAME s_scm_symbol_set_x
1044 scm_c_issue_deprecation_warning ("`symbol-set!' is deprecated. "
1045 "Use the module system instead.");
1047 SCM_VALIDATE_SYMBOL (2,s
);
1048 if (scm_is_false (o
))
1051 return SCM_UNSPECIFIED
;
1053 SCM_VALIDATE_VECTOR (1,o
);
1054 vcell
= scm_sym2ovcell (s
, o
);
1055 SCM_SETCDR (vcell
, v
);
1056 return SCM_UNSPECIFIED
;
1060 #define MAX_PREFIX_LENGTH 30
1062 static int gentemp_counter
;
1064 SCM_DEFINE (scm_gentemp
, "gentemp", 0, 2, 0,
1065 (SCM prefix
, SCM obarray
),
1066 "Create a new symbol with a name unique in an obarray.\n"
1067 "The name is constructed from an optional string @var{prefix}\n"
1068 "and a counter value. The default prefix is @code{t}. The\n"
1069 "@var{obarray} is specified as a second optional argument.\n"
1070 "Default is the system obarray where all normal symbols are\n"
1071 "interned. The counter is increased by 1 at each\n"
1072 "call. There is no provision for resetting the counter.")
1073 #define FUNC_NAME s_scm_gentemp
1075 char buf
[MAX_PREFIX_LENGTH
+ SCM_INTBUFLEN
];
1080 scm_c_issue_deprecation_warning ("`gentemp' is deprecated. "
1081 "Use `gensym' instead.");
1083 if (SCM_UNBNDP (prefix
))
1090 SCM_VALIDATE_STRING (1, prefix
);
1091 len
= scm_i_string_length (prefix
);
1092 name
= scm_to_locale_stringn (prefix
, &len
);
1093 name
= scm_realloc (name
, len
+ SCM_INTBUFLEN
);
1096 if (SCM_UNBNDP (obarray
))
1097 return scm_gensym (prefix
);
1099 SCM_ASSERT ((scm_is_vector (obarray
) || SCM_I_WVECTP (obarray
)),
1104 n_digits
= scm_iint2str (gentemp_counter
++, 10, &name
[len
]);
1105 while (scm_is_true (scm_intern_obarray_soft (name
,
1110 SCM vcell
= scm_intern_obarray_soft (name
,
1116 return SCM_CAR (vcell
);
1122 scm_i_makinum (scm_t_signed_bits val
)
1124 scm_c_issue_deprecation_warning
1125 ("SCM_MAKINUM is deprecated. Use scm_from_int or similar instead.");
1126 return SCM_I_MAKINUM (val
);
1130 scm_i_inump (SCM obj
)
1132 scm_c_issue_deprecation_warning
1133 ("SCM_INUMP is deprecated. Use scm_is_integer or similar instead.");
1134 return SCM_I_INUMP (obj
);
1138 scm_i_inum (SCM obj
)
1140 scm_c_issue_deprecation_warning
1141 ("SCM_INUM is deprecated. Use scm_to_int or similar instead.");
1142 return scm_to_intmax (obj
);
1146 scm_c_string2str (SCM obj
, char *str
, size_t *lenp
)
1148 scm_c_issue_deprecation_warning
1149 ("scm_c_string2str is deprecated. Use scm_to_locale_stringbuf or similar instead.");
1153 char *result
= scm_to_locale_string (obj
);
1155 *lenp
= scm_i_string_length (obj
);
1160 /* Pray that STR is large enough.
1162 size_t len
= scm_to_locale_stringbuf (obj
, str
, SCM_I_SIZE_MAX
);
1171 scm_c_substring2str (SCM obj
, char *str
, size_t start
, size_t len
)
1173 scm_c_issue_deprecation_warning
1174 ("scm_c_substring2str is deprecated. Use scm_substring plus scm_to_locale_stringbuf instead.");
1177 obj
= scm_substring (obj
, scm_from_size_t (start
), SCM_UNDEFINED
);
1179 scm_to_locale_stringbuf (obj
, str
, len
);
1183 /* Converts the given Scheme symbol OBJ into a C string, containing a copy
1184 of OBJ's content with a trailing null byte. If LENP is non-NULL, set
1185 *LENP to the string's length.
1187 When STR is non-NULL it receives the copy and is returned by the function,
1188 otherwise new memory is allocated and the caller is responsible for
1189 freeing it via free(). If out of memory, NULL is returned.
1191 Note that Scheme symbols may contain arbitrary data, including null
1192 characters. This means that null termination is not a reliable way to
1193 determine the length of the returned value. However, the function always
1194 copies the complete contents of OBJ, and sets *LENP to the length of the
1195 scheme symbol (if LENP is non-null). */
1197 scm_c_symbol2str (SCM obj
, char *str
, size_t *lenp
)
1199 return scm_c_string2str (scm_symbol_to_string (obj
), str
, lenp
);
1203 scm_truncate (double x
)
1205 scm_c_issue_deprecation_warning
1206 ("scm_truncate is deprecated. Use scm_c_truncate instead.");
1207 return scm_c_truncate (x
);
1211 scm_round (double x
)
1213 scm_c_issue_deprecation_warning
1214 ("scm_round is deprecated. Use scm_c_round instead.");
1215 return scm_c_round (x
);
1219 scm_i_deprecated_symbol_chars (SCM sym
)
1221 scm_c_issue_deprecation_warning
1222 ("SCM_SYMBOL_CHARS is deprecated. Use scm_symbol_to_string.");
1224 return (char *)scm_i_symbol_chars (sym
);
1228 scm_i_deprecated_symbol_length (SCM sym
)
1230 scm_c_issue_deprecation_warning
1231 ("SCM_SYMBOL_LENGTH is deprecated. Use scm_symbol_to_string.");
1232 return scm_i_symbol_length (sym
);
1236 scm_i_keywordp (SCM obj
)
1238 scm_c_issue_deprecation_warning
1239 ("SCM_KEYWORDP is deprecated. Use scm_is_keyword instead.");
1240 return scm_is_keyword (obj
);
1244 scm_i_keywordsym (SCM keyword
)
1246 scm_c_issue_deprecation_warning
1247 ("SCM_KEYWORDSYM is deprecated. See scm_keyword_to_symbol instead.");
1248 return scm_keyword_dash_symbol (keyword
);
1252 scm_i_vectorp (SCM x
)
1254 scm_c_issue_deprecation_warning
1255 ("SCM_VECTORP is deprecated. Use scm_is_vector instead.");
1256 return SCM_I_IS_VECTOR (x
);
1260 scm_i_vector_length (SCM x
)
1262 scm_c_issue_deprecation_warning
1263 ("SCM_VECTOR_LENGTH is deprecated. Use scm_c_vector_length instead.");
1264 return SCM_I_VECTOR_LENGTH (x
);
1270 scm_c_issue_deprecation_warning
1271 ("SCM_VELTS is deprecated. Use scm_vector_elements instead.");
1272 return SCM_I_VECTOR_ELTS (x
);
1276 scm_i_writable_velts (SCM x
)
1278 scm_c_issue_deprecation_warning
1279 ("SCM_WRITABLE_VELTS is deprecated. "
1280 "Use scm_vector_writable_elements instead.");
1281 return SCM_I_VECTOR_WELTS (x
);
1285 scm_i_vector_ref (SCM x
, size_t idx
)
1287 scm_c_issue_deprecation_warning
1288 ("SCM_VECTOR_REF is deprecated. "
1289 "Use scm_c_vector_ref or scm_vector_elements instead.");
1290 return scm_c_vector_ref (x
, idx
);
1294 scm_i_vector_set (SCM x
, size_t idx
, SCM val
)
1296 scm_c_issue_deprecation_warning
1297 ("SCM_VECTOR_SET is deprecated. "
1298 "Use scm_c_vector_set_x or scm_vector_writable_elements instead.");
1299 scm_c_vector_set_x (x
, idx
, val
);
1303 scm_vector_equal_p (SCM x
, SCM y
)
1305 scm_c_issue_deprecation_warning
1306 ("scm_vector_euqal_p is deprecated. "
1307 "Use scm_equal_p instead.");
1308 return scm_equal_p (x
, y
);
1312 scm_i_arrayp (SCM a
)
1314 scm_c_issue_deprecation_warning
1315 ("SCM_ARRAYP is deprecated. Use scm_is_array instead.");
1316 return SCM_I_ARRAYP(a
);
1320 scm_i_array_ndim (SCM a
)
1322 scm_c_issue_deprecation_warning
1323 ("SCM_ARRAY_NDIM is deprecated. "
1324 "Use scm_c_array_rank or scm_array_handle_rank instead.");
1325 return scm_c_array_rank (a
);
1329 scm_i_array_contp (SCM a
)
1331 scm_c_issue_deprecation_warning
1332 ("SCM_ARRAY_CONTP is deprecated. Do not use it.");
1333 return SCM_I_ARRAY_CONTP (a
);
1337 scm_i_array_mem (SCM a
)
1339 scm_c_issue_deprecation_warning
1340 ("SCM_ARRAY_MEM is deprecated. Do not use it.");
1341 return (scm_t_array
*)SCM_I_ARRAY_MEM (a
);
1345 scm_i_array_v (SCM a
)
1347 /* We could use scm_shared_array_root here, but it is better to move
1348 them away from expecting vectors as the basic storage for arrays.
1350 scm_c_issue_deprecation_warning
1351 ("SCM_ARRAY_V is deprecated. Do not use it.");
1352 return SCM_I_ARRAY_V (a
);
1356 scm_i_array_base (SCM a
)
1358 scm_c_issue_deprecation_warning
1359 ("SCM_ARRAY_BASE is deprecated. Do not use it.");
1360 return SCM_I_ARRAY_BASE (a
);
1364 scm_i_array_dims (SCM a
)
1366 scm_c_issue_deprecation_warning
1367 ("SCM_ARRAY_DIMS is deprecated. Use scm_array_handle_dims instead.");
1368 return SCM_I_ARRAY_DIMS (a
);
1372 scm_i_cur_inp (void)
1374 scm_c_issue_deprecation_warning
1375 ("scm_cur_inp is deprecated. Use scm_current_input_port instead.");
1376 return scm_current_input_port ();
1380 scm_i_cur_outp (void)
1382 scm_c_issue_deprecation_warning
1383 ("scm_cur_outp is deprecated. Use scm_current_output_port instead.");
1384 return scm_current_output_port ();
1388 scm_i_cur_errp (void)
1390 scm_c_issue_deprecation_warning
1391 ("scm_cur_errp is deprecated. Use scm_current_error_port instead.");
1392 return scm_current_error_port ();
1396 scm_i_cur_loadp (void)
1398 scm_c_issue_deprecation_warning
1399 ("scm_cur_loadp is deprecated. Use scm_current_load_port instead.");
1400 return scm_current_load_port ();
1404 scm_i_progargs (void)
1406 scm_c_issue_deprecation_warning
1407 ("scm_progargs is deprecated. Use scm_program_arguments instead.");
1408 return scm_program_arguments ();
1412 scm_i_deprecated_dynwinds (void)
1414 scm_c_issue_deprecation_warning
1415 ("scm_dynwinds is deprecated. Do not use it.");
1416 return scm_i_dynwinds ();
1420 scm_i_deprecated_last_debug_frame (void)
1422 scm_c_issue_deprecation_warning
1423 ("scm_last_debug_frame is deprecated. Do not use it.");
1424 return scm_i_last_debug_frame ();
1428 scm_i_stack_base (void)
1430 scm_c_issue_deprecation_warning
1431 ("scm_stack_base is deprecated. Do not use it.");
1432 return SCM_I_CURRENT_THREAD
->base
;
1436 scm_i_fluidp (SCM x
)
1438 scm_c_issue_deprecation_warning
1439 ("SCM_FLUIDP is deprecated. Use scm_is_fluid instead.");
1440 return scm_is_fluid (x
);
1446 #ifdef HAVE_NETWORKING
1448 SCM_DEFINE (scm_inet_aton
, "inet-aton", 1, 0, 0,
1450 "Convert an IPv4 Internet address from printable string\n"
1451 "(dotted decimal notation) to an integer. E.g.,\n\n"
1453 "(inet-aton \"127.0.0.1\") @result{} 2130706433\n"
1455 #define FUNC_NAME s_scm_inet_aton
1457 scm_c_issue_deprecation_warning
1458 ("`inet-aton' is deprecated. Use `inet-pton' instead.");
1460 return scm_inet_pton (scm_from_int (AF_INET
), address
);
1465 SCM_DEFINE (scm_inet_ntoa
, "inet-ntoa", 1, 0, 0,
1467 "Convert an IPv4 Internet address to a printable\n"
1468 "(dotted decimal notation) string. E.g.,\n\n"
1470 "(inet-ntoa 2130706433) @result{} \"127.0.0.1\"\n"
1472 #define FUNC_NAME s_scm_inet_ntoa
1474 scm_c_issue_deprecation_warning
1475 ("`inet-ntoa' is deprecated. Use `inet-ntop' instead.");
1477 return scm_inet_ntop (scm_from_int (AF_INET
), inetid
);
1481 #endif /* HAVE_NETWORKING */
1485 scm_i_defer_ints_etc ()
1487 scm_c_issue_deprecation_warning
1488 ("SCM_DEFER_INTS etc are deprecated. "
1489 "Use a mutex instead if appropriate.");
1493 scm_i_mask_ints (void)
1495 scm_c_issue_deprecation_warning ("`scm_mask_ints' is deprecated.");
1496 return (SCM_I_CURRENT_THREAD
->block_asyncs
!= 0);
1501 scm_guard (SCM guardian
, SCM obj
, int throw_p
)
1503 scm_c_issue_deprecation_warning
1504 ("scm_guard is deprecated. Use scm_call_1 instead.");
1506 return scm_call_1 (guardian
, obj
);
1510 scm_get_one_zombie (SCM guardian
)
1512 scm_c_issue_deprecation_warning
1513 ("scm_guard is deprecated. Use scm_call_0 instead.");
1515 return scm_call_0 (guardian
);
1518 SCM_DEFINE (scm_guardian_destroyed_p
, "guardian-destroyed?", 1, 0, 0,
1520 "Return @code{#t} if @var{guardian} has been destroyed, otherwise @code{#f}.")
1521 #define FUNC_NAME s_scm_guardian_destroyed_p
1523 scm_c_issue_deprecation_warning
1524 ("'guardian-destroyed?' is deprecated.");
1529 SCM_DEFINE (scm_guardian_greedy_p
, "guardian-greedy?", 1, 0, 0,
1531 "Return @code{#t} if @var{guardian} is a greedy guardian, otherwise @code{#f}.")
1532 #define FUNC_NAME s_scm_guardian_greedy_p
1534 scm_c_issue_deprecation_warning
1535 ("'guardian-greedy?' is deprecated.");
1540 SCM_DEFINE (scm_destroy_guardian_x
, "destroy-guardian!", 1, 0, 0,
1542 "Destroys @var{guardian}, by making it impossible to put any more\n"
1543 "objects in it or get any objects from it. It also unguards any\n"
1544 "objects guarded by @var{guardian}.")
1545 #define FUNC_NAME s_scm_destroy_guardian_x
1547 scm_c_issue_deprecation_warning
1548 ("'destroy-guardian!' is deprecated and ineffective.");
1549 return SCM_UNSPECIFIED
;
1554 /* GC-related things. */
1556 unsigned long scm_mallocated
, scm_mtrigger
;
1557 size_t scm_max_segment_size
;
1559 #if defined (GUILE_DEBUG) || defined (GUILE_DEBUG_FREELIST)
1561 scm_map_free_list (void)
1567 #if defined (GUILE_DEBUG_FREELIST)
1569 scm_gc_set_debug_check_freelist_x (SCM flag
)
1571 return SCM_UNSPECIFIED
;
1578 * Trampolines were an intent to speed up calling the same Scheme procedure many
1581 * However, this was the wrong thing to optimize; if you really know what you're
1582 * calling, call its function directly, otherwise you're in Scheme-land, and we
1583 * have many better tricks there (inlining, for example, which can remove the
1584 * need for closures and free variables).
1586 * Also, in the normal debugging case, trampolines were being computed but not
1591 scm_trampoline_0 (SCM proc
)
1593 scm_c_issue_deprecation_warning
1594 ("`scm_trampoline_0' is deprecated. Just use `scm_call_0' instead.");
1599 scm_trampoline_1 (SCM proc
)
1601 scm_c_issue_deprecation_warning
1602 ("`scm_trampoline_1' is deprecated. Just use `scm_call_1' instead.");
1607 scm_trampoline_2 (SCM proc
)
1609 scm_c_issue_deprecation_warning
1610 ("`scm_trampoline_2' is deprecated. Just use `scm_call_2' instead.");
1616 scm_i_init_deprecated ()
1618 #include "libguile/deprecated.x"