UBI: turn some macros into static inline