Replace C macros with static funcs (please inline, C compilers...)