lua: Various fixes to the bindings (thanks Jerome Vuarand).

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).
This commit is contained in:
Richard W.M. Jones
2012-11-20 16:20:12 +00:00
parent 8f80f9fdae
commit ca488a6d7b
15 changed files with 88 additions and 52 deletions

View File

@@ -1,10 +1,10 @@
-- Example showing how to create a disk image.
require "guestfs"
local G = require "guestfs"
output = "disk.img"
local output = "disk.img"
g = Guestfs.create ()
local g = G.create ()
-- Create a raw-format sparse disk image, 512 MB in size.
file = io.open (output, "w")