Re: Performance implications of large FFI constants

  • From: "Pierre Chapuis" <catwell@xxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 26 Sep 2012 10:59:50 +0200

I tend to use the later case but I use tables for namespaces instead of a
prefix and an underscore (after all we have a real namespacing mechanism
in Lua...).

That means:

-- library code

    return {
      MWMO = {
        ALERTABLE = ...,
        INPUTAVAILABLE = ...,
      }
    }

-- client code

    local MWNO = U32.MWNO
    local dwFlags = bor(MWMO.ALERTABLE, MWMO.INPUTAVAILABLE)

-- 
Pierre 'catwell' Chapuis


Other related posts: