diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-05-01 21:09:24 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-05-01 21:09:24 +0200 |
commit | 547fa99389439b62fca04243e62560bfcbafb0b4 (patch) | |
tree | 4458cff55054677ac7bed629998f59ec76dfddf0 | |
parent | Add options to --statprof. (diff) | |
download | calp-547fa99389439b62fca04243e62560bfcbafb0b4.tar.gz calp-547fa99389439b62fca04243e62560bfcbafb0b4.tar.xz |
Change function for creating hashtables.
-rw-r--r-- | module/output/html.scm | 3 | ||||
-rw-r--r-- | src/guile_interface.scm.c | 2 | ||||
-rw-r--r-- | src/guile_type_helpers.h | 1 |
3 files changed, 2 insertions, 4 deletions
diff --git a/module/output/html.scm b/module/output/html.scm index c6ba389c..01736cac 100644 --- a/module/output/html.scm +++ b/module/output/html.scm @@ -102,7 +102,7 @@ ,@(map (lambda (time) `(div (@ (class "clock clock-" ,time)) "")) (iota 12 0 2)) - ,@(stream->list (stream-map (lambda (e) (vevent->sxml date e)) events)))))) + ,@(map (lambda (e) (vevent->sxml date e)) (stream->list events)))))) (define (time-marker-div) `(div (@ (class "sideclock")) @@ -132,7 +132,6 @@ (end (time->string (attr ev 'DTEND) fmt))) (values start end))) - (define (fmt-single-event ev) `(article (@ (id ,(UID ev)) (class "eventtext CAL_bg_" diff --git a/src/guile_interface.scm.c b/src/guile_interface.scm.c index 4d70c127..20c413df 100644 --- a/src/guile_interface.scm.c +++ b/src/guile_interface.scm.c @@ -74,7 +74,7 @@ SCM_DEFINE (vcomponent_get_attribute, "%vcomponent-get-attribute", 2, 0, 0, // TODO why is it an error to unprotect the object here? // scm_from_strbuf should already have protected it... // scm_gc_unprotect_object(v->key.scm); - SCM htable = SCM_MAKE_HASH_TABLE(); + SCM htable = scm_make_hash_table (scm_from_ulong(32)); val = scm_cons(val, htable); v->key.scm = val; scm_gc_protect_object(v->key.scm); diff --git a/src/guile_type_helpers.h b/src/guile_type_helpers.h index 537c23c5..c936f45d 100644 --- a/src/guile_type_helpers.h +++ b/src/guile_type_helpers.h @@ -7,7 +7,6 @@ #include "strbuf.h" #define SCM_IS_LIST(x) scm_is_true(scm_list_p(x)) -#define SCM_MAKE_HASH_TABLE() scm_c_eval_string("(make-hash-table)") SCM scm_from_strbuf(strbuf* s); SCM scm_from_strbuf_symbol(strbuf* s); |