lua-users home
lua-l archive

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

--- El mar 6-dic-11, Tim Caswell <> escribió:

> De: Tim Caswell <>
> Asunto: Re: How to properly initialize a module?
> Para: "Lua mailing list" <>
> Fecha: martes, 6 de diciembre de 2011, 16:26
> I think stock lua's require allows
> this and I know I do in Luvit, but
> often I'll make the module itself be a function instead of
> a table.
> Then it would be
> local Canvas = require('canvas')
> local canvas = Canvas('/dev/fb0')

How would this be implemented from C-side?