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:
parent
0a3ac81a1c
commit
e80494083a
1 changed files with 2 additions and 2 deletions
|
@ -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"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue