aboutsummaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/vcomponent.scm6
-rw-r--r--module/vcomponent/primitive.scm3
2 files changed, 6 insertions, 3 deletions
diff --git a/module/vcomponent.scm b/module/vcomponent.scm
index 6df4d7b8..d1a0abff 100644
--- a/module/vcomponent.scm
+++ b/module/vcomponent.scm
@@ -119,7 +119,7 @@
%vcomponent-set-type!))
(define-public parent %vcomponent-parent)
(define-public push-child! %vcomponent-push-child!)
-(define-public (attributes component) (map string->symbol (%vcomponent-attribute-list component)))
+(define-public attributes %vcomponent-attribute-list)
(define-public copy-vcomponent %vcomponent-shallow-copy)
@@ -148,7 +148,7 @@
(%vcomponent-make)
(let* ((root (%vcomponent-make path))
(component
- (case (string->symbol (or (attr root "X-HNH-SOURCETYPE") "no-type"))
+ (case (or (attr root "X-HNH-SOURCETYPE") 'no-type)
;; == Single ICS file ==
;; Remove the abstract ROOT component,
;; returning the wanted VCALENDAR component
@@ -166,7 +166,7 @@
((vdir)
(let ((accum (make-vcomponent))
(ch (children root)))
- (set! (type accum) "VCALENDAR")
+ (set! (type accum) 'VCALENDAR)
(unless (null? ch)
(for key in (attributes (car ch))
diff --git a/module/vcomponent/primitive.scm b/module/vcomponent/primitive.scm
index 06b6fd83..53d73652 100644
--- a/module/vcomponent/primitive.scm
+++ b/module/vcomponent/primitive.scm
@@ -20,3 +20,6 @@
(string-append (dirname (dirname (dirname (current-filename))))
"/lib"))
(load-extension "libguile-calendar" "init_lib")
+
+(define (%vcomponent-attribute-list comp)
+ (map car (hash-map->list cons (%vcomponent-get-hash-table comp))))