mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-27 05:30:23 +02:00
* libguile/ephemerons.c (scm_make_ephemeron): Relax restriction that key be a heap object. It's too annoying otherwise. (scm_c_ephemeron_table_clear_x): (scm_ephemeron_table_clear_x): New interface. * module/ice-9/ephemerons.scm: Expose ephemeron-table-clear!. * test-suite/tests/ephemerons.test ("ephemerons"): Update tests.
43 lines
1.4 KiB
Scheme
43 lines
1.4 KiB
Scheme
;;; Copyright (C) 2025 Free Software Foundation, Inc.
|
||
;;;
|
||
;;; This library 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.
|
||
;;;
|
||
;;; This library 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 this program. If not, see
|
||
;;; <http://www.gnu.org/licenses/>.
|
||
|
||
;;; Commentary:
|
||
;;;
|
||
;;;
|
||
;;; Code:
|
||
|
||
|
||
(define-module (ice-9 ephemerons)
|
||
#:export (ephemeron?
|
||
make-ephemeron
|
||
ephemeron-key
|
||
ephemeron-value
|
||
ephemeron-swap!
|
||
ephemeron-mark-dead!
|
||
ephemeron-next
|
||
|
||
make-ephemeron-table
|
||
ephemeron-table?
|
||
ephemeron-table-length
|
||
|
||
ephemeron-table-ref
|
||
ephemeron-table-push!
|
||
ephemeron-table-try-push!
|
||
ephemeron-table-clear!))
|
||
|
||
(eval-when (expand load eval)
|
||
(load-extension (string-append "libguile-" (effective-version))
|
||
"scm_init_ephemerons"))
|