use EXTERN_INLINE instead of STATIC_INLINE to avoid some gcc warnings