mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 06:41:13 +02:00
add trap-name procedure
* module/system/vm/trap-state.scm (trap-name): New proc.
This commit is contained in:
parent
abb4b5cbbd
commit
6263b8722e
1 changed files with 5 additions and 0 deletions
|
@ -28,6 +28,7 @@
|
||||||
#:use-module (system vm trace)
|
#:use-module (system vm trace)
|
||||||
#:export (list-traps
|
#:export (list-traps
|
||||||
trap-enabled?
|
trap-enabled?
|
||||||
|
trap-name
|
||||||
enable-trap!
|
enable-trap!
|
||||||
disable-trap!
|
disable-trap!
|
||||||
delete-trap!
|
delete-trap!
|
||||||
|
@ -161,6 +162,10 @@
|
||||||
(trap-wrapper-name wrapper)))
|
(trap-wrapper-name wrapper)))
|
||||||
(trap-state-wrappers trap-state)))
|
(trap-state-wrappers trap-state)))
|
||||||
|
|
||||||
|
(define* (trap-name idx #:optional (trap-state (the-trap-state)))
|
||||||
|
(and=> (wrapper-at-index trap-state idx)
|
||||||
|
trap-wrapper-name))
|
||||||
|
|
||||||
(define* (trap-enabled? idx #:optional (trap-state (the-trap-state)))
|
(define* (trap-enabled? idx #:optional (trap-state (the-trap-state)))
|
||||||
(and=> (wrapper-at-index trap-state idx)
|
(and=> (wrapper-at-index trap-state idx)
|
||||||
trap-wrapper-enabled?))
|
trap-wrapper-enabled?))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue