This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.
If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.
- Outdated egg!
This extension embeds the Lua interpreter into a CHICKEN extension.
Source code for the Lua VM is included (version 5.1).
Creates and returns a fresh Lua execution context containing all base libraries.
- lua-close STATEprocedure
Closes a Lua execution context and performs all necessary cleanup. The effect of using Lua data from the closed context is undefined.
- lua-run-string STATE STRING #!optional NAMEprocedure
Executes the Lua statements in STRING and returns its result(s). The optional argument NAME can be given to identify the source of the Lua code (used in error messages).
- lua-run-file STATE PATHNAMEprocedure
Executes the statements in the file designated by PATHNAME and returns any result(s).
- lua-eval STATE STRINGprocedure
Evaluates the Lua expression in STRING and returns any result(s).
- lua-call LUAFUNCTION ARG ...procedure
Calls the Lua function LUAFUNCTION which must have been obtained through evaluation of Lua code with the given arguments.
- lua-function? Xprocedure
Returns #t if X is a Lua function or #f otherwise.
- lua-state? Xprocedure
Returns #t if X is a Lua execution context (as returned by lua-open) or #f otherwise.
- lua-thread? Xprocedure
Returns #t if X is a Lua thread or #f otherwise.
- lua-table? Xprocedure
Returns #t if X is a Lua table or #f otherwise.
- lua-userdata? Xprocedure
Returns #t if X is a Lua userdata object or #f otherwise.
- lua-global-ref STATE STRINGprocedure
[setter procedure] (set! (lua-global-ref STATE STRING) X)
Gets or sets the global variable named by STRING in the given Lua execution context.
- lua-table-ref TABLE KEYprocedure
[setter procedure] (set! (lua-table-ref TABLE KEY) X)
Gets or sets the table element in TABLE indexed by the Lua value KEY.
|userdata||userdata record (opaque)|
|thread||thread record (opaque)|
|string or symbol||string|
|char||string (holding a single character)|
|function||can not be passed as argument|
|vector or a-list||table|
PUC-Rio, packaged as egg by felix winkelmann
Lua is licensed under the terms of the MIT license reproduced below. This means that Lua is free software and can be used for both academic and commercial purposes at absolutely no cost.
For details and rationale, see http://www.lua.org/license.html .
Copyright (C) 1994-2006 Lua.org, PUC-Rio. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Ported to Chicken 4
- Lua nil is handled as (void) [suggested by John Cowan]
- initial release