commit | b5e7e54faba5bc06ebd76cd64b0dd5e2c1d06f0c | [log] [tgz] |
---|---|---|
author | Paul J. Davis <paul.joseph.davis@gmail.com> | Fri Dec 12 14:25:38 2014 -0600 |
committer | Alexander Shorin <kxepal@apache.org> | Thu Oct 15 19:43:46 2015 +0300 |
tree | 30b3a5591e5d43b8521faeb2925d5f6d252a37db | |
parent | 92598cd33abca43e9d1d2e30057b47e207313ad3 [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. This closes #23 COUCHDB-2511 Signed-off-by: Alexander Shorin <kxepal@apache.org>