mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 22:10:21 +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)
|
||||
#:export (list-traps
|
||||
trap-enabled?
|
||||
trap-name
|
||||
enable-trap!
|
||||
disable-trap!
|
||||
delete-trap!
|
||||
|
@ -161,6 +162,10 @@
|
|||
(trap-wrapper-name wrapper)))
|
||||
(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)))
|
||||
(and=> (wrapper-at-index trap-state idx)
|
||||
trap-wrapper-enabled?))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue