Re: LuaJIT 2 ffi.load questions
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: LuaJIT 2 ffi.load questions
- From: Mike Pall <mikelu-1107@...>
- Date: 2011年7月11日 15:39:54 +0200
Alexander Gladysh wrote:
> I've got two questions / feature requests for ffi.load():
>
> 1. On failure, do not throw error, but return nil, error_message.
Use pcall.
> 2. Please provide a way to set the lookup path, similar to lua.cpath.
> I would like to load a custom built .so without installing it to the
> system, with an option to fall back to the system one if custom is not
> available.
The underlying OS functions do not expose their lookup paths. You
can easily build this functionality yourself on top of ffi.load().
--Mike