1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-05 19:50:23 +02:00
guile/module/oop
Andy Wingo 134c3be452 Add ephemeron tables
* libguile/ephemerons.h:
* libguile/ephemerons.c (scm_c_make_ephemeron):
(scm_c_ephemeron_key):
(scm_c_ephemeron_value):
(scm_c_ephemeron_mark_dead_x):
(scm_c_ephemeron_swap_x):
(scm_c_ephemeron_next): Add C ephemeron API.
(scm_make_ephemeron, scm_ephemeron_key, scm_ephemeron_value)
(scm_ephemeron_mark_dead_x): Dispatch to helpers above.
(scm_ephemeron_swap_x, scm_ephemeron_mark_dead_x): New Scheme-exposed
functions.
(scm_c_make_ephemeron_table):
(scm_c_ephemeron_table_length):
(scm_c_ephemeron_table_ref):
(scm_c_ephemeron_table_push_x):
(scm_c_ephemeron_table_try_push_x): New C API for tables of ephemerons.
(scm_ephemeron_table_length):
(scm_ephemeron_table_ref):
(scm_ephemeron_table_push_x):
(scm_ephemeron_table_try_push_x): New Scheme-exposed API.
(scm_c_ephemeron_hash_table_refq):
(scm_c_ephemeron_hash_table_setq_x):
(scm_c_ephemeron_hash_table_copy): New C API for use by internal weak
table users (dynamic states, etc).

* module/ice-9/ephemerons.scm: Add new Scheme API.

* libguile/evalext.c (scm_self_evaluating_p):
* libguile/goops.c (scm_class_of, %goops-early-init):
* libguile/print.c (iprin1):
* module/oop/goops.scm:
* libguile/scm.h (scm_tc7_ephemeron_table): Add new tc7 for ephemeron
tables.

* test-suite/tests/ephemerons.test ("ephemeron tables"): Add tests.
2025-05-12 13:45:21 +02:00
..
goops Move weak tables out to a module 2025-05-12 13:45:07 +02:00
ChangeLog-2008 move ice-9/ and oop/ under module/ 2008-11-01 12:44:21 +01:00
goops.scm Add ephemeron tables 2025-05-12 13:45:21 +02:00