aboutsummaryrefslogtreecommitdiff
path: root/src/guile
diff options
context:
space:
mode:
Diffstat (limited to 'src/guile')
-rw-r--r--src/guile/skribilo/utils/compat.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/guile/skribilo/utils/compat.scm b/src/guile/skribilo/utils/compat.scm
index 45abd10..c187975 100644
--- a/src/guile/skribilo/utils/compat.scm
+++ b/src/guile/skribilo/utils/compat.scm
@@ -206,7 +206,13 @@
(define-public hashtable? hash-table?)
(define-public hashtable-get (lambda (h k) (hash-ref h k #f)))
(define-public hashtable-put! hash-set!)
-(define-public hashtable-update! hash-set!)
+(define-public (hashtable-update! table key update-proc init-value)
+ ;; This is a Bigloo-specific API.
+ (let ((handle (hash-get-handle table key)))
+ (if (not handle)
+ (hash-set! table key init-value)
+ (set-cdr! handle (update-proc (cdr handle))))))
+
(define-public hashtable->list (lambda (h)
(map cdr (hash-map->list cons h))))