GitHub user iilyak opened a pull request:
https://github.com/apache/couchdb/pull/348
Define OTP_VSN/OTP_RELEASE/HAS_CALLBACKS macro
We define HAS_CALLBACKS feature macro in order to make `dialyzer`
happy. OTP releases prior to 15 require defining `behaviour_info` instead
of a `callback` attribute. New macro could be used to make conditional
compilation as follows:
```
-ifdef(HAS_CALLBACKS).
-callback app() -> atom().
-else.
-export([behaviour_info/1]).
behaviour_info(callbacks) ->
[
{app, 0}
];
behaviour_info(_) ->
undefined.
-endif.
```
The same approach could be used to eliminate the cost of
`erlang:function_exported` in `couch_crypto.erl`.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloudant/couchdb set_features
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/couchdb/pull/348.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #348
----
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---