[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: module with c api
- From: Thijs Schreijer <thijs@...>
- Date: Thu, 22 Aug 2013 12:59:13 +0000
> -----Original Message-----
> From: email@example.com [mailto:firstname.lastname@example.org] On
> Behalf Of Philipp Kraus
> Sent: donderdag 22 augustus 2013 13:02
> To: list mailing Lua
> Subject: module with c api
> I have got some modules (LUA script files) which are used with
> local mymodul = require "mymodule"
> All data is converted to a database, so each LUA script should be a row in
Is "data" the source code or the compiled byte code? In the latter case it is not portable, so be aware of that.
> my table.
> How can I use the code (without any changes)?
> I use on C side lua_loadstring to load the script data, so I have concated
> all rows
> and all the load string function, but imho the require should fail.
> My tasks are: I have got some pure LUA modules which are stored in clob
> in the database. On a used defined action all moduls items should be
> with the main script to the interpreter.
> Can anybody send me some tips?
Try loaders, see . Create a loader that checks your database for the requested module and fetches it.