1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 21:10:27 +02:00

Fix invalid use of `SCM' as a Boolean.

* libguile/deprecated.c (scm_sym2var): Check `scm_is_true (definep)'.
This commit is contained in:
Ludovic Courtès 2012-06-08 12:44:07 +02:00
parent 0a3ac81a1c
commit e80494083a

View file

@ -2653,13 +2653,13 @@ scm_i_deprecated_asrtgo (scm_t_bits condition)
* the scm_pre_modules_obarray (a `eq' hash table). * the scm_pre_modules_obarray (a `eq' hash table).
*/ */
SCM SCM
scm_sym2var (SCM sym, SCM proc, SCM definep) scm_sym2var (SCM sym, SCM proc, SCM definep)
#define FUNC_NAME "scm_sym2var" #define FUNC_NAME "scm_sym2var"
{ {
SCM var; SCM var;
if (definep) if (scm_is_true (definep))
scm_c_issue_deprecation_warning scm_c_issue_deprecation_warning
("scm_sym2var is deprecated. Use scm_define or scm_module_define\n" ("scm_sym2var is deprecated. Use scm_define or scm_module_define\n"
"to define variables. In some rare cases you may need\n" "to define variables. In some rare cases you may need\n"