Skip to content
Browse files

1.2 map lookups don't treat ints and longs as the same, so we need to…

… be consistent
  • Loading branch information...
1 parent b908b63 commit 0aa339a7fbdf422bc69d3061041dd20346545916 @ztellman committed May 8, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 project.clj
  2. +1 −1 src/gloss/core/codecs.clj
  3. +1 −1 test/gloss/test/core.clj
View
2 project.clj
@@ -1,4 +1,4 @@
-(defproject gloss "0.2.1-rc1"
+(defproject gloss "0.2.1-rc2"
:description "speaks in bytes, so that you don't have to"
:license {:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
View
2 src/gloss/core/codecs.clj
@@ -178,7 +178,7 @@
[primitive-type & map-or-seq]
(assert (primitive-codecs primitive-type))
(let [coerce #(if (char? %)
- (int %)
+ (long (int %))
(long %))
n->v (if (and (= 1 (count map-or-seq)) (map? (first map-or-seq)))
(let [m (first map-or-seq)]
View
2 test/gloss/test/core.clj
@@ -214,7 +214,7 @@
:a)
(test-roundtrip
(enum :int16 {:a 100 :b 1000 :c \c})
- :b))
+ :c))
(deftest test-bit-seq
(test-roundtrip

0 comments on commit 0aa339a

Please sign in to comment.
Something went wrong with that request. Please try again.