summaryrefslogtreecommitdiff
path: root/xml-rpc-lolevel.scm
diff options
context:
space:
mode:
Diffstat (limited to 'xml-rpc-lolevel.scm')
-rw-r--r--xml-rpc-lolevel.scm13
1 files changed, 7 insertions, 6 deletions
diff --git a/xml-rpc-lolevel.scm b/xml-rpc-lolevel.scm
index d33b0c8..b0df44f 100644
--- a/xml-rpc-lolevel.scm
+++ b/xml-rpc-lolevel.scm
@@ -4,7 +4,7 @@
;;
;; This file contains the plumbing for XML RPC value marshaling/unmarshaling.
;
-; Copyright (c) 2009-2012, Peter Bex
+; Copyright (c) 2009-2012, 2016, Peter Bex
; Parts Copyright (c) Felix Winkelmann
; All rights reserved.
;
@@ -126,10 +126,11 @@
(,list? . ,list->xml-rpc-array))))
(define (value->xml-rpc-fragment value)
- ((alist-ref value (xml-rpc-unparsers)
- (lambda (pred? v) (pred? v))
- (lambda _ (error "No parser for value " value)))
- value))
+ (let ((pred&unparser (find (lambda (p&u) ((car p&u) value))
+ (xml-rpc-unparsers))))
+ (if pred&unparser
+ ((cdr pred&unparser) value)
+ (error "No parser for value " value))))
(define (xml-rpc-int->number fragment)
(string->number (sxml:text fragment)))
@@ -192,4 +193,4 @@
(lambda _ (error "No unparser for tag " (car fragment))))
fragment))
-) \ No newline at end of file
+)