#ifndef SCM_EPHEMERONS_H #define SCM_EPHEMERONS_H /* Copyright 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 . */ #include "libguile/scm.h" struct gc_ephemeron; struct scm_ephemeron_table; SCM_INTERNAL struct gc_ephemeron* scm_c_make_ephemeron (SCM k, SCM v); SCM_INTERNAL SCM scm_c_ephemeron_key (struct gc_ephemeron *e); SCM_INTERNAL SCM scm_c_ephemeron_value (struct gc_ephemeron *e); SCM_INTERNAL struct gc_ephemeron* scm_c_ephemeron_next (struct gc_ephemeron *e); SCM_INTERNAL SCM scm_c_ephemeron_swap_x (struct gc_ephemeron *e, SCM new_val); SCM_INTERNAL void scm_c_ephemeron_mark_dead_x (struct gc_ephemeron *e); SCM_INTERNAL int scm_i_print_ephemeron (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED); SCM_INTERNAL struct gc_ephemeron* scm_to_ephemeron (SCM e); SCM_INTERNAL SCM scm_from_ephemeron (struct gc_ephemeron *e); SCM_INTERNAL struct gc_ephemeron* scm_c_ephemeron_load (struct gc_ephemeron **loc); SCM_INTERNAL void scm_c_ephemeron_push (struct gc_ephemeron **loc, struct gc_ephemeron *e); SCM_INTERNAL struct scm_ephemeron_table* scm_c_make_ephemeron_table (size_t count); SCM_INTERNAL size_t scm_c_ephemeron_table_length (struct scm_ephemeron_table *et); SCM_INTERNAL struct gc_ephemeron* scm_c_ephemeron_table_ref (struct scm_ephemeron_table *et, size_t idx); SCM_INTERNAL void scm_c_ephemeron_table_push_x (struct scm_ephemeron_table *et, size_t idx, struct gc_ephemeron * e); SCM_INTERNAL struct gc_ephemeron* scm_c_ephemeron_table_try_push_x (struct scm_ephemeron_table *et, size_t idx, struct gc_ephemeron * e, struct gc_ephemeron *prev); SCM_INTERNAL struct scm_ephemeron_table* scm_c_ephemeron_table_copy (struct scm_ephemeron_table *et); SCM_INTERNAL int scm_i_print_ephemeron_table (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED); SCM_INTERNAL struct scm_ephemeron_table* scm_to_ephemeron_table (SCM e); SCM_INTERNAL SCM scm_from_ephemeron_table (struct scm_ephemeron_table *e); SCM_INTERNAL SCM scm_c_ephemeron_hash_table_refq (struct scm_ephemeron_table *et, SCM k, SCM default_value); SCM_INTERNAL void scm_c_ephemeron_hash_table_setq_x (struct scm_ephemeron_table *et, SCM k, SCM v); SCM_INTERNAL void scm_register_ephemerons (void); #endif /* SCM_EPHEMERONS_H */