diff options
author | Eduardo Julian | 2019-04-16 18:47:13 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-04-16 18:47:13 -0400 |
commit | 42248854f0cb5e3364e6aae25527cee65cbda3e8 (patch) | |
tree | c0a8c65fb8dc11d85cca22fe03182f39bf22ef1a /stdlib/source/lux/data/text/encoding.lux | |
parent | afddac31e065ae1df0c7c78cc2ce6d13b01896c6 (diff) |
The old compiler is now identified with "old" instead of "jvm". This should help to get old JVM code and new JVM code to coexist without forcing a major rewrite of old compiler code to get it to fit the style of the new JVM compiler code.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/data/text/encoding.lux | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/lux/data/text/encoding.lux b/stdlib/source/lux/data/text/encoding.lux index b4372471c..aae640382 100644 --- a/stdlib/source/lux/data/text/encoding.lux +++ b/stdlib/source/lux/data/text/encoding.lux @@ -173,20 +173,20 @@ (|>> :representation)) ) -(`` (for {(~~ (static _.jvm)) - (as-is (import: java/lang/String - (new [(Array byte) String]) - (getBytes [String] (Array byte))))})) +(`` (for {(~~ (static _.old)) + (as-is (import: #long java/lang/String + (new [(Array byte) java/lang/String]) + (getBytes [java/lang/String] (Array byte))))})) (def: #export (to-utf8 value) (-> Text Binary) - (`` (for {(~~ (static _.jvm)) - (String::getBytes (..name ..utf-8) (:coerce String value))}))) + (`` (for {(~~ (static _.old)) + (java/lang/String::getBytes (..name ..utf-8) (:coerce java/lang/String value))}))) (def: #export (from-utf8 value) (-> Binary (Error Text)) - (`` (for {(~~ (static _.jvm)) - (#error.Success (String::new value (..name ..utf-8)))}))) + (`` (for {(~~ (static _.old)) + (#error.Success (java/lang/String::new value (..name ..utf-8)))}))) (structure: #export UTF-8 (Codec Binary Text) (def: encode ..to-utf8) |