From 584462f9b9efefa25e93600024c3d9680923b3a4 Mon Sep 17 00:00:00 2001 From: UENISHI Kota Date: Thu, 1 Jul 2010 01:16:25 +0900 Subject: [PATCH] erlang: improved spec. --- erlang/msgpack.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erlang/msgpack.erl b/erlang/msgpack.erl index 8a542712..aab07b72 100644 --- a/erlang/msgpack.erl +++ b/erlang/msgpack.erl @@ -64,8 +64,9 @@ pack(_Other) -> % if failed in decoding and not end, get more data % and feed more Bin into this function. % TODO: error case for imcomplete format when short for any type formats. --spec unpack( binary() )-> - {msgpack_term(), binary()} | {more, non_neg_integer()} | {error, reason()}. +-spec unpack( Bin::binary() )-> {msgpack_term(), binary()} | + {more, non_neg_integer()} | {more, undefined} | + {error, reason()}. unpack(Bin) when not is_binary(Bin)-> {error, badarg}; unpack(Bin) when bit_size(Bin) >= 8 ->