lua-users home
lua-l archive

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


I would advise reading "The C API" from programming in lua. Don't skip anything, or it won't be clear.

Here's a link:
 http://www.lua.org/pil/24.html

Good luck and have fun. It becomes simple quickly enough. =)

- Alex

----- Original Message ----- From: cabbage
To: lua@bazar2.conectiva.com.br
Sent: Tuesday, March 04, 2008 6:51 PM
Subject: A question about call c function in lua

pure c code like this:
struct list{

struct list * prev;
struct list * next;
void * data;

};

int list_travel(struct list *h)
{
.....
}

The function list_travel travel the hole list h and do something, how can I can this function in lua script? Thanks.