obj: move deref and assign macros to header