Skip to content

Commit

Permalink
Adds a type hint when emitting strings. Significant performance impro…
Browse files Browse the repository at this point in the history
…vement in some workloads.
  • Loading branch information
arohner committed Oct 20, 2010
1 parent 08eb7d9 commit 185f4ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion project.clj
@@ -1,4 +1,4 @@
(defproject scriptjure "0.1.17"
(defproject scriptjure "0.1.18"
:description "a clojure DSL for generating javascript"
:url "http://github.com/arohner/scriptjure"
:dependencies [[org.clojure/clojure "1.2.0"]
Expand Down
2 changes: 1 addition & 1 deletion src/com/reasonr/scriptjure.clj
Expand Up @@ -55,7 +55,7 @@
(defmethod emit clojure.lang.Ratio [expr]
(str (float expr)))

(defmethod emit java.lang.String [expr]
(defmethod emit java.lang.String [^String expr]
(str \" (.replace expr "\"" "\\\"") \"))

(defn valid-symbol? [sym]
Expand Down

0 comments on commit 185f4ff

Please sign in to comment.