/* Copyright 2003-2004,2006,2008-2018,2020,2021,2022,2025
Free Software Foundation, Inc.
This file is part of Guile.
Guile is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Guile is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with Guile. If not, see
. */
#ifdef HAVE_CONFIG_H
# include
#endif
#define SCM_BUILDING_DEPRECATED_CODE
#include "deprecation.h"
#include "eval.h"
#include "gsubr.h"
#include "modules.h"
#include "threads.h"
#include "variable.h"
#include "deprecated.h"
#if (SCM_ENABLE_DEPRECATED == 1)
/* Deprecated functions go here. */
static SCM make_guardian_var;
static void
init_make_guardian_var (void)
{
make_guardian_var = scm_c_public_lookup ("ice-9 guardians", "make-guardian");
}
SCM
scm_make_guardian (void)
{
static scm_i_pthread_once_t once = SCM_I_PTHREAD_ONCE_INIT;
scm_i_pthread_once (&once, init_make_guardian_var);
scm_c_issue_deprecation_warning
("The scm_make_guardian C interface is deprecated. Invoke the Scheme "
"make-guardian procedure from (ice-9 guardians) instead.");
return scm_call_0 (scm_variable_ref (make_guardian_var));
}
void
scm_i_init_deprecated ()
{
#include "deprecated.x"
}
#endif /* SCM_ENABLE_DEPRECATED == 1 */