lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I haven't used the Lua<->C interface yet, but this makes it easily approachable, even inviting.  It's simple enough to see how the functionality could be duplicated in pure C.  Very cool!

However, your example isn't quite minimal.  You wrote:
    #include <stdio.h>
    #include "clue.h"

    lua_State *L;

    CLUE_DEFS(L);
    ...
The CLUE_DEFS(L) macro is expanded to lua_State *L; you've defined it twice.  Since *L is a global variable, this is OK according to the compiler, but I don't think you want it in your example.
--
Kevin Vermeer


On Thu, Feb 24, 2011 at 4:49 PM, Reuben Thomas <rrt@sc3d.org> wrote:
I am happy to announce release 5 of clue, my minimal C to Lua
integration framework.

This release adds full traceback on Lua error, which makes debugging a
lot easier. Unfortunately, this means there's now a C file as well as
a header file, so the release is no longer a single header file.
Fortunately, as well as the C and header files, there's a minimal
example in the release zip.

Get it from http://luaforge.net/projects/clue/

--
http://rrt.sc3d.org