Author: fdmanana
Date: Thu Apr 7 19:29:12 2011
New Revision: 1089948
URL: http://svn.apache.org/viewvc?rev=1089948&view=rev
Log:
ejson application init function must return 'true' on R13B03
On OTP R13B03, the function invoked by the "on_load" directive (introduced
in this release) must return the atom 'true' and not 'ok'.
The Erlang preprocessor also seems to ignore any unknown directives, so
the use of the "on_load" directive should not cause compilation errors
on older OTP releases (<= R13B02).
Thanks to Matt Goodall for reporting this and providing a patch.
Modified:
couchdb/trunk/src/ejson/ejson.erl
Modified: couchdb/trunk/src/ejson/ejson.erl
URL:
http://svn.apache.org/viewvc/couchdb/trunk/src/ejson/ejson.erl?rev=1089948&r1=1089947&r2=1089948&view=diff
==============================================================================
--- couchdb/trunk/src/ejson/ejson.erl (original)
+++ couchdb/trunk/src/ejson/ejson.erl Thu Apr 7 19:29:12 2011
@@ -27,7 +27,10 @@ init() ->
filename:join(Dir, ejson)
end,
(catch erlang:load_nif(SoName, 0)),
- ok.
+ case erlang:system_info(otp_release) of
+ "R13B03" -> true;
+ _ -> ok
+ end.
decode(IoList) ->