lua-users home
lua-l archive

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


Dear all,

I am using SWIG 1.3.28 to extend the Lua environment with a custom
library written in C. 

I am stumbling on the following problem:

* given the following C definitions:

typedef unsigned long channel_list_t[CONFIG_MAX_CHANNELS_NUMBER];
void do_test( channel_list_t * chans);

* I would like to be able to manipulate instances of channel_list_t as
in the following Lua code:

aa = channels_list_t()
aa[0] = 1
aa[1] = 10
...
do_test(aa)

But it doesn't work since the SWIG wrapper defines channels_list_t as
user-data.

Is there a way to do that ? Is there something I didn't correctly
understood ? 

Any link or exemple would be greatly appreciated. I have already checked
on the Internet but it may have escaped my search.

Thanks a lot for your attention,
Sylvain

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote confirms that this email message has been scanned for 
the presence of computer viruses.
**********************************************************************