[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: the new require() in 4.1alpha and shared library?
- From: "Brian Zhou" <b88zhou@...>
- Date: Thu, 25 Oct 2001 23:08:40 -0700
Hi,
I'm trying to use the luaswig to wrap some C functions. In one of its
examples has the function call like this:
require("./1.so")
When running,
error: invalid control char;
last token read: `0x7F' at line 1 in file `././1.so'
stack traceback:
1: function `require' [C]
2: main of file `t_1.lua' at line 1
I realized it's a new standard function but could not find any documentation
for it. How does it load shared library?
I also want to know, how does luaswig compare with toLua? I want to wrap and
group extern "C" functions and make them OO in the Lua. Something like (in
SWIG-python interface syntax):
%addmethods Queue {
Queue(int capacity) { return q_new(capacity); }
~Queue() { q_delete(self); }
BOOL isEmpty() { return q_isEmpty(self); }
BOOL isFull() { return q_isFull(self); }
}
What's your recommendation?
Thanks for any pointers,
-Brian