You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2010/06/15 03:28:03 UTC
svn commit: r954688 - /couchdb/trunk/src/couchdb/couch_util.erl
Author: kocolosk
Date: Tue Jun 15 01:28:03 2010
New Revision: 954688
URL: http://svn.apache.org/viewvc?rev=954688&view=rev
Log:
iodata() type is too new for us
Modified:
couchdb/trunk/src/couchdb/couch_util.erl
Modified: couchdb/trunk/src/couchdb/couch_util.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_util.erl?rev=954688&r1=954687&r2=954688&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_util.erl (original)
+++ couchdb/trunk/src/couchdb/couch_util.erl Tue Jun 15 01:28:03 2010
@@ -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.