Skip to content

Commit

Permalink
Fix Int64 not encoded because of its class name changed to haxe._Int6…
Browse files Browse the repository at this point in the history
…4.___Int64 and use high and low getter instead of getHigh() and getLow()
  • Loading branch information
aaulia committed May 30, 2015
1 parent 1178ace commit d77102f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions org/msgpack/Encoder.hx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class Encoder {

case TClass(c):
switch (Type.getClassName(c)) {
case "haxe.Int64" : writeInt64(d);
case "haxe.io.Bytes" : writeBinary(d);
case "haxe._Int64.___Int64" : writeInt64(d);
case "haxe.io.Bytes" : writeBinary(d);
case "String" : writeString(d);
case "Array" : writeArray (d);
case "haxe.ds.IntMap" | "haxe.ds.StringMap" | "haxe.ds.UnsafeStringMap" :
Expand All @@ -51,8 +51,8 @@ class Encoder {

inline function writeInt64(d:Int64) {
o.writeByte(0xd3);
o.writeInt32(Int64.getHigh(d));
o.writeInt32(Int64.getLow(d));
o.writeInt32(d.high);
o.writeInt32(d.low);
}

inline function writeInt(d:Int) {
Expand Down

0 comments on commit d77102f

Please sign in to comment.