From c6d88e66bf2809f289d9f3046e14038fe0969014 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Tue, 15 Jun 2010 01:28:03 +0000 Subject: iodata() type is too new for us git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@954688 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_util.erl | 5 +++-- 1 file 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. -- cgit v1.2.3