Add IS_OLD_RECORD macro

This can be used in guards to detect if a state variable needs to be
upgraded. An example of it's use might be:

    handle_call(Msg, From, St) when ?IS_OLD_RECORD(St, #st{}) ->
        handle_call(Msg, From, upgrade_state(St));

This is useful for upgrading any of our various gen behaviors that
aren't properly supervised.

This closes #23

COUCHDB-2511

Signed-off-by: Alexander Shorin <kxepal@apache.org>
1 file changed
tree: 30b3a5591e5d43b8521faeb2925d5f6d252a37db
  1. include/
  2. priv/
  3. src/
  4. test/
  5. .gitignore
  6. .travis.yml
  7. LICENSE
  8. rebar.config.script