[guile-json] remove dependency on srfi-43

this is a compatibility hack to remove dependency on srfi-43 which is
not present on ubuntu 14.04. create a simplified vector-for-each
suitable for this module.
This commit is contained in:
Christopher Lam 2019-01-19 23:13:01 +08:00
parent 816dd3ea2a
commit 66ae2abb8e

View File

@ -27,11 +27,17 @@
(define-module (json builder)
#:use-module (ice-9 format)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-43)
#:use-module (rnrs bytevectors)
#:export (scm->json
scm->json-string))
;; simplified vector-for-each suitable for use in this module
(define (vector-for-each fn v)
(for-each
(lambda (i)
(fn i (vector-ref v i)))
(iota (vector-length v))))
;;
;; String builder helpers
;;