diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-05-02 23:44:20 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-05-02 23:44:20 +0200 |
commit | 4ec130209bcd88ffde56b9b44e2de2c043519ffc (patch) | |
tree | 06fef07fac9fda6461e4e28b5eb2724bece52c92 /module | |
parent | work on porting most internal datastructures to scheme equivalents. (diff) | |
download | calp-4ec130209bcd88ffde56b9b44e2de2c043519ffc.tar.gz calp-4ec130209bcd88ffde56b9b44e2de2c043519ffc.tar.xz |
Think it's only reintroducing of set! left.
Diffstat (limited to '')
-rw-r--r-- | module/vcomponent.scm | 6 | ||||
-rw-r--r-- | module/vcomponent/primitive.scm | 3 |
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)))) |