[thrift] erlang: dialyzer bug: binary protocol double type ...
authoreletuchy <dev-null@apache.org>
Wed, 27 Feb 2008 19:56:52 +0000 (19:56 +0000)
committereletuchy <dev-null@apache.org>
Wed, 27 Feb 2008 19:56:52 +0000 (19:56 +0000)
Summary: ... needs to be specified as a float to work, since
         erlang's binary syntax default is "integer"

Reviewed By: cpiro

Test Plan: make dialyzer -j

Revert Plan: sure

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665529 13f79535-47bb-0310-9956-ffa450edef68

lib/erl/src/protocol/tBinaryProtocol.erl

index cc71684..2155be6 100644 (file)
@@ -128,7 +128,7 @@ writeI64(This, I64) when is_integer(I64) ->
 
 writeDouble(This, Double) when is_float(Double) ->
     Trans = oop:get(This, trans),
-    ?R1(Trans, effectful_write, <<Double:64/big>>).
+    ?R1(Trans, effectful_write, <<Double:64/float-big>>).
 
 writeString(This, Str) when is_list(Str) -> % [char()] or iolist()
     Trans = oop:get(This, trans),