| commit | dd83465cee262162bee4819dc21cbca073181861 | [log] [tgz] |
|---|---|---|
| author | Paul J. Davis <paul.joseph.davis@gmail.com> | Fri Dec 12 14:25:38 2014 -0600 |
| committer | Paul J. Davis <paul.joseph.davis@gmail.com> | Fri Dec 12 14:25:38 2014 -0600 |
| tree | 0cf3c0b6d37a34ff1fab7e355c8bae8945e06024 | |
| parent | a4dbd6413f37b51ad9504b6a04e9e04c23e856bf [diff] |
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.
COUCHDB-2511