[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [LuaJIT FFI feature request] ffi.load name transformation callback
- From: Adam Strzelecki <ono@...>
- Date: Fri, 20 Jan 2012 11:33:50 +0100
> if ffi.exports(ffi.C, 'known_function') then
local pointer, ok_or_error = pcall(function () return ffi.C['known_function'] end )
> - fail, *without* polluting cdef
Yup I can see a problem when two separate libraries define functions under same name, but different prototype. Then calling that with FFI is no go. One you define 1st prototype you cannot redefine it for 2nd library.
Would be nice if cdef took library as optional argument and defined symbols in the library context not global context.
--
Adam Strzelecki