1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 05:30:21 +02:00

Reimplement guardians in Scheme

Also, shunt them off to a module, and deprecate the C interface.

* module/ice-9/guardians.scm: New file.
* am/bootstrap.am (SOURCES): Add new file.

* libguile.h: Remove guardians.h include.
* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
(DOT_X_FILES):
(DOT_DOC_FILES):
(modinclude_HEADERS): Remove guardians.[ch] files.
* libguile/init.c (scm_i_init_guile): Remove guardians.

* libguile/deprecated.h:
* libguile/deprecated.c (scm_make_guardian): Deprecate.
* module/ice-9/deprecated.scm: Add make-guardian shim.

* module/oop/goops.scm (<guardian>): Remove class; they no longer have a
tc16.

* module/ice-9/popen.scm: Add guardians module.
* test-suite/tests/eval.test:
* test-suite/tests/fluids.test:
* test-suite/tests/gc.test:
* test-suite/tests/guardians.test:
* test-suite/tests/threads.test:
* test-suite/tests/types.test: Use the guardians module.
This commit is contained in:
Andy Wingo 2025-05-04 20:41:16 +02:00
parent b1d7d3538a
commit 66f9815c3f
19 changed files with 156 additions and 448 deletions

View file

@ -85,7 +85,7 @@
<promise> <mutex> <condition-variable>
<regexp> <hook> <random-state>
<directory> <array> <character-set>
<dynamic-object> <guardian> <macro>
<dynamic-object> <macro>
;; Modules.
<module>
@ -3537,7 +3537,6 @@ var{initargs}."
(define <directory> (find-subclass <top> '<directory>))
(define <array> (find-subclass <top> '<array>))
(define <character-set> (find-subclass <top> '<character-set>))
(define <guardian> (find-subclass <applicable> '<guardian>))
(define <macro> (find-subclass <top> '<macro>))
;; <dynamic-object> used to be a SMOB type, albeit not exported even to