Use inline functions instead of macros