lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> Q 1) If I have mylib.lua and mylib.dll, then  "require'mylib'" will
> load the DLL first. (I like this). What was the thinking behing this?

Currently, LUA_PATH may have a last fixed component, which will be
called whenever Lua cannot find a module. If we search the LUA_PATH
first, we will loose that facility.

> Q 2) If CPATH is empty then the mylib.lua would be loaded rather
> than mylib.dll.  Methinks that for Win32 (at least) that an empty or
> non-existent CPATH should result in loadlib("mylib", ...).

Why cpath would be empty or non-existent? Lua always initializes it to a
convenient default.

> Q 3) Luiz's library name convention of namespace = 'mylib' and the file
> name of '' and the open function of 'luaopen_mylib' is changed
> to use ''.  Again what was the reason for this change?

I followed the guidelines in

that were discussed in this list. Anyway, you only have to change
the cpath to add that `l' to library names (".../l?.dll").

-- Roberto