Quantcast

Trouble accessing constants using SWIG and LUA

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Trouble accessing constants using SWIG and LUA

danz
This post has NOT been accepted by the mailing list yet.
I have successfully generated SWIG wrappers for Ruby and Python.
My recent attempt to wrap LUA however has me stumped.

I can access all my string constants, but none of my integers.

static swig_lua_const_info swig_SwigModule_constants[]= {
    {SWIG_LUA_CONSTTAB_STRING("MEM_DUMP_CMD_FILE", "/tmp/debug-flags/mem-dump-")},
    {SWIG_LUA_CONSTTAB_INT("BACKTRACE_BUF_SIZE", 2048)},

For example;
require "mod"
print (mod.MEM_DUMP_CMD_FILE) returns the "/tmp..." string

print (mod.BACKTRACE_BUF_SIZE) returns 0.

Any idea's are appreciated!!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trouble accessing constants using SWIG and LUA

danz
I figure out my problem.
We have our LUA web server (Lighttpd) treating integers as unsigned integers.
The problem was resolved after compiling the SWIG stuff like Lighttpd.
Loading...