summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2010-06-15 01:28:03 +0000
committerAdam Kocoloski <kocolosk@apache.org>2010-06-15 01:28:03 +0000
commitc6d88e66bf2809f289d9f3046e14038fe0969014 (patch)
tree107c06b5e4ecca62d03bf3e6e817919ef589c081 /src
parenta18aec2186b83815b38ad4a03bf5a7a0e8cc718a (diff)
iodata() type is too new for us
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@954688 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_util.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/couchdb/couch_util.erl b/src/couchdb/couch_util.erl
index 69f78042..881ea2fb 100644
--- a/src/couchdb/couch_util.erl
+++ b/src/couchdb/couch_util.erl
@@ -414,7 +414,7 @@ compressible_att_type(MimeType) ->
[T || T <- TypeExpList, T /= []]
).
--spec md5(Data::iodata()) -> Digest::binary().
+-spec md5(Data::(iolist() | binary())) -> Digest::binary().
md5(Data) ->
try crypto:md5(Data) catch error:_ -> erlang:md5(Data) end.
@@ -422,7 +422,8 @@ md5(Data) ->
md5_init() ->
try crypto:md5_init() catch error:_ -> erlang:md5_init() end.
--spec md5_update(Context::binary(), Data::iodata()) -> NewContext::binary().
+-spec md5_update(Context::binary(), Data::(iolist() | binary())) ->
+ NewContext::binary().
md5_update(Ctx, D) ->
try crypto:md5_update(Ctx,D) catch error:_ -> erlang:md5_update(Ctx,D) end.