mesa: convert macros to inline functions