ffi.cdef()

  • From: Matej Švec <trojhlav@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 20 Jul 2012 10:01:14 +0200

Hello!

How and when does ffi.cdef() execute ?
Does luajit translate and register these definitions during the first file
load or does it execute as it is located in the file ?
I've been toying with the idea of having local ffi.cdef() definitions per
lua functions - in order to hide the C functions from "global" ffi.C scope.
Could this be considered as a good idea or would it just add unnecessary
overhead to lua functions ?

Thanks.
Matej

Other related posts: