Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Jun 23, 2015
  1. glib: add override Glib.SourceFuncs.prepare

    This fixes missing [out] annotation for timeout parameter.
  2. record: allow defining custom callback field type

    Allow defining custom table-based callback signature for record
  3. - add optional target address argument

    It is now possible to construct callable based both on baseinfo or
    table definition with target address from Lua side.
  4. callable: fix tostring and

    tstring for efn-type callable did not print address correctly and left
    garbage on the stack. had wrong reference counting on
Commits on Jun 22, 2015
  1. GLib: Add automatic GLib.SourceFuncs lifetime control

    When GLib.SourceFuncs are used for creating GLib.Source, the source
    takes ownership of sourcefuncs so that marshalling guards are kept
    alive as long as the source itself is alive.
Commits on Jun 21, 2015
  1. Implement setting callback fields of structs

    It is now possible to assign Lua functions to fields of structs of
    ponter-to-function type.  There is a gotcha - these fields are valid
    only as long as lgi-wrapper for the structure exists, then they go to
    limbo and will crash when callbacks are invoked.
Commits on Jun 16, 2015
  1. Gdk: don't break for non-existent event types

    This hopefully allows using gtk-2 with lgi again.
Commits on Mar 29, 2015
  1. Merge pull request #105 from ntd/xbuild

    Changes needed for proper cross-building to MinGW environment
Commits on Mar 23, 2015
  1. Prepare 0.9.0 release

Commits on Mar 13, 2015
  1. @ntd

    Allow overriding of the host build system

    ntd authored
    When cross compiling, the build system is different from the host
    system, so directly using `uname` is not an option.
    Use the helper variable HOST_OS so it can be overriden when calling
    make and leave the current command (uname -s) as its default value.
    Better would be to use a full system triplet and rely on config.guess
    (like autoconf does) but this would significantly increase the
    complexity of the build system.
  2. @ntd

    Extend platform support to MSYS and MinGW

    ntd authored
    Consider MSYS and MinGW platforms as Windows based and handle them
    Credits go to Niels Nesse ( for highlighting
    the problem.
  3. @ntd

    Export luaopen_lgi_corelgilua51

    ntd authored
    On windows functions must be exported from dynamic modules in order to
    be accessible. Use the G_MODULE_EXPORT macro provided by GLib that
    resolves to a no-op on non-windows platforms.
  4. @ntd

    Allow overriding of pkg-config executable

    ntd authored
    Defined a PKG_CONFIG makefile variable and using it instead of the
    hardcoded "pkg-config" value. This allows the use of a custom
    pkg-config, e.g. "make PKG_CONFIG=i686-w64-mingw32-pkg-config", a quite
    common convention adopted during cross compilation.
Commits on Feb 21, 2015
  1. marshal: fix incorrect values/crash for GPtrArray return values

    Jiří Klimeš authored committed
    There are two problems: (a) entries of GPtrArray are not taken as pointers,
    (b) their size is not computed correctly (zero is returned).
     #!/usr/bin/env lua
     local lgi = require 'lgi'
     local NM = lgi.NM
     client =
     device = client:get_device_by_iface("em1")
     ip4_cfg = device:get_ip4_config()
     print("IPv4 addresses:")
     for _, nm_address in ipairs(ip4_cfg:get_addresses()) do
       addr = nm_address:get_address()
       prefix = nm_address:get_prefix()
       print(string.format("%s/%d", addr, prefix))
     print("IPv4 routes:")
     for _, nm_route in ipairs(ip4_cfg:get_routes()) do
       dest = nm_route:get_dest()
       prefix = nm_route:get_prefix()
       next_hop = nm_route:get_next_hop()
       metric = nm_route:get_metric()
       print(string.format("%s/%d  %s  %d", dest, prefix, next_hop, metric))
    Signed-off-by: Jiří Klimeš <>
  2. Disable gobject.ctor_gc tests unless explicitely asked for

    Lua 5.3 and 5.1 have problems finishing the run of the test probably
    because of insane GC settings inside the test.
  3. Workaround for

    Provide phony config.h file since release regress.c from GoI wants it
Commits on Feb 1, 2015
  1. Remove usage of string.upper() and string.lower()

    Lua implements those using NLS-sensitive way, which breaks things in
    our intended usage.  So implement our own core.downcase() and
    core.upcase() which works simple ASCII-only operation and replace all
    usages with these new methods.
    This is actually better fix for
  2. Reverting "Workaround hacks for running lgi in turkish locale"

    Revert "Workaround hacks for running lgi in turkish locale"
    This reverts commit f89027c.
Commits on Jan 31, 2015
  1. marshal: add support for GPtrArray and GByteArray

    Jiří Klimeš authored committed
    Without that lgi crashed e.g for GPtrArray* return values.
    See this example:
    NetworkManager libnm API:
    Signed-off-by: Jiří Klimeš <>
  2. Initial Lua 5.3 compatibility work

    Use luaL_checkinteger instead of luaL_checkint -> based on the patch
    by David Favro.
    Disabled ctor_gc test, which seems to stress Lua GC
    in a way that test proceeds very slowly (would probably take years to
    GTK testsuite and many samples still fail with 'C stack overflow'
  3. Merge pull request #99 from gregier/strict-mode-compliant

    Support running LGI in strict mode
  4. Merge pull request #96 from gregier/forgotten-local

    Add forgotten local
  5. Merge pull request #95 from gregier/object-tostring

    Add support for _tostring() for object
Commits on Jan 27, 2015
  1. @gregier

    Support running LGI in strict mode

    gregier authored
    Don't attempt to direclty access globals that might not
    exist, instead use rawget().
    Strict Mode:
Commits on Jan 10, 2015
  1. @gregier

    Add support for _tostring() for object

    gregier authored
    Allows custom definition of tostring() operation
    on object instances.
Commits on Jan 7, 2015
  1. @gregier

    Add forgotten local

    gregier authored
Commits on Nov 20, 2014
  1. Add support for custom property getters and setters

    Also document overriding of properties.
Commits on Nov 19, 2014
  1. Export lgi.lock, lgi.enter and lgi.leave

    These can be useful when integrating lgi into C code which needs to
    synchronize access to Lua state containing lgi for access from
    multiple threads.
  2. Simplify state_id calculation

    Cosmetic change only.  Fixes small bug which caused that initial id
    was not empty, but "+L0", only 2nd state was empty string.
Commits on Nov 12, 2014
  1. Merge pull request #91 from gregier/multi-state-derive

    Fix multiple state type registration
Commits on Nov 8, 2014
  1. @gregier

    Fix multiple state type registration

    gregier authored
    If there are multiple states always append a state unique
    id of the form "+L%u". This has no affect on the first state, thus
    avoiding type name changes and a state is still prevented from
    registering the same type name multiple times.
Something went wrong with that request. Please try again.