Changeset 8172 in project


Ignore:
Timestamp:
02/06/08 03:31:45 (12 years ago)
Author:
graham
Message:

optimized hart-html-escape procedure

Location:
hart
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • hart/hart-support.scm

    r3330 r8172  
    134134;;;strings and escaping
    135135
    136 (define (hart-html-escape s)
    137   ;; optimize this.
    138   (string-substitute* (->string s) '(("&" . "&")
    139                                      ("<" . "&lt;")
    140                                      (">" . "&gt;"))))
     136(define hart-html-escape
     137  (foreign-lambda c-string* "hart_html_escape" c-string))
    141138
    142139(define (empty-string? s) (= (string-length s) 0))
  • hart/hart.meta

    r2751 r8172  
    55 (license "BSD")
    66 (author "Graham Fawcett <graham.fawcett@gmail.com>")
    7  (files "hart.scm" "hart-support.scm" "hart.setup")
     7 (files "hart.scm" "hart-support.scm" "hart.setup" "fast_escape.c")
    88 (doc-from-wiki))
  • hart/hart.setup

    r2752 r8172  
    1 (run (csc -s -X hart.scm hart-support.scm))
     1(run (csc -s -X hart.scm hart-support.scm fast_escape.c))
    22
    33(install-extension
Note: See TracChangeset for help on using the changeset viewer.