Merge pull request #365 from soby-mathew/sm/static_fns_compat

Change the compatibility API to inline functions