summaryrefslogtreecommitdiffstats
path: root/generator/lua.ml
Commit message (Collapse)AuthorAgeFilesLines
* lua: Replace internal lua_guestfs_* functions with guestfs_lua_*.Richard W.M. Jones2012-11-201-19/+19
| | | | | This is just code motion. It just ensures there is no possible conflict with lua_* symbols.
* lua: Attach __tostring functions exceptions.Richard W.M. Jones2012-11-201-0/+29
| | | | This includes a test.
* lua: Fix whitespace.Richard W.M. Jones2012-11-201-2/+0
|
* lua: Various fixes to the bindings (thanks Jerome Vuarand).Richard W.M. Jones2012-11-201-11/+37
| | | | | | | | | | | | See http://article.gmane.org/gmane.comp.lang.lua.general/95065 Note that this is incompatible with existing code. You have to do: local G = require "guestfs" local g = G.create () ie. give the module your own name ("G" in that example).
* lua: Print the error thrown by callbacks.Richard W.M. Jones2012-11-201-2/+18
|
* lua: Add comment (not fix) for incorrect 'g' argument in callbacks.Richard W.M. Jones2012-11-201-1/+4
| | | | Thanks Jerome Vuarand.
* lua: Use lua_rawgeti to read elements from lists of strings.Richard W.M. Jones2012-11-201-2/+1
| | | | | | This is faster, but more importantly it avoids the strange error 'lua: attempt to index a string value' which appears with (some) single element lists.
* lua: Allow regular int to be passed as a 64 bit integer.Richard W.M. Jones2012-11-201-4/+13
|
* lua: Simplify get_event function.Richard W.M. Jones2012-11-201-21/+12
| | | | Use luaL_checkoption which is designed for this purpose.
* lua: Add global Guestfs.event_all (list of all events).Richard W.M. Jones2012-11-191-0/+15
|
* lua: Various fixes and enhancements:Richard W.M. Jones2012-11-191-27/+299
| | | | | | | | | - add support for events (with test) - test progress messages - update documentation to describe events - refactor handle closing code - refactor error code - use 'assert' in test code instead of 'if ... then error end'
* lua: Don't use %m since Lua string formatter doesn't understand it.Richard W.M. Jones2012-11-181-2/+5
| | | | Use %s + strerror as a replacement.
* lua: Add some missing features.Richard W.M. Jones2012-11-171-7/+33
| | | | | | | | - Remove default error handler. - User cancel. - Add the errno to the object which is thrown on error. Still no events.
* Add Lua bindings.Richard W.M. Jones2012-11-171-0/+561
These are relatively complete, although only lightly tested. Missing: - events - last_errno - user_cancel