Ticket #699: make-uri-for-uri-generic-and-uri-common.patch

File make-uri-for-uri-generic-and-uri-common.patch, 1.9 KB (added by Moritz Heidkamp, 10 years ago)
  • uri-generic/trunk/uri-generic.scm

     
    4040(provide 'uri-generic)
    4141
    4242(module uri-generic
    43   (uri-reference update-uri update-authority
     43  (uri-reference make-uri update-uri update-authority
    4444   uri-reference? uri-auth uri-authority uri-scheme uri-path uri-query
    4545   uri-fragment uri-host uri-port uri-username uri-password
    4646   authority? authority-host authority-port
     
    134134          (make-URI scheme: scheme path: path query: query fragment: fragment
    135135                    authority: final-auth))) key/values))))
    136136
     137(define (make-uri . key/values)
     138  (apply update-uri (make-URI) key/values))
     139
    137140;; Character classes
    138141 
    139142(define (hexdigit-char? c)    (and (char? c) (char-set-contains? char-set:hex-digit c)))
  • uri-common/trunk/uri-common.scm

     
    4242(module uri-common
    4343  (uri-reference uri-reference? absolute-uri absolute-uri? relative-ref?
    4444   uri->uri-generic uri-generic->uri uri->list
    45    update-uri uri? uri-scheme uri-username uri-password
     45   make-uri update-uri uri? uri-scheme uri-username uri-password
    4646   uri-host uri-port uri-path uri-query uri-fragment
    4747   uri->string form-urlencode form-urldecode form-urlencoded-separator
    4848   uri-relative-to uri-relative-from
     
    215215          (URI-common-fragment-set! uc fragment))
    216216        uc))))
    217217
     218(define (make-uri . key/values)
     219  (apply update-uri (make-URI-common generic: (generic:make-uri)) key/values))
     220
    218221(define uri-encode-string generic:uri-encode-string)
    219222(define uri-decode-string generic:uri-decode-string)
    220223(define char-set:gen-delims generic:char-set:gen-delims)