lua-users home
lua-l archive

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

Roberto Ierusalimschy wrote:
> Currently, our idea is to put the minimum in C, and everything else in
> Lua. Typically, each module in C would have a companion file in Lua:
> this Lua file could be very small, more or less like this:
>     -- Lua file for module Xuxu: xuxu.lua
>     -- Config part; set to your system
>     local libdir = "/usr/local/lua/"
>     local modname = ""
>     local f = loadlib(libdir..modname, "xuxuopen")
>     if not f then error (...) end
>     f()   -- open module
> You put anywhere, adjust xuxu.lua, and put xuxu.lua in a
> directory on your LUA_PATH; than you use it as
>     require "xuxu"
> For the user, it doesn't matter whether this is a C module or a Lua
> module (or a mixed one).

Ok, I see, that's fine then!
I'm eager to start seen extension modules distributed that way.

Ignacio Castaño

Copa del Mundo de la FIFA 2002
El único lugar de Internet con vídeos de los 64 partidos. 
¡Apúntante ya! en