slang-users mailing list

[2008 Date Index] [2008 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] Creating nested structures


"John E. Davis" <davis@xxxxxxxxxxxxx> a écrit :

The use of SLang_load_string has the effect of pushing the structure
onto the slang stack.  While this will accomplish the stated goal, I
am not sure if this is really what you want.

Hello John,

As you guessed, this is not exactly what I want (anyway, I'am happy to know this trick, thanks). I'am creating a module for the future libusb-1.0, to be able to send low level commands to an usb device from a S-lang script. Some libusb structures are opaque type but others have to be exposed to the interpreter, and some of them have nested fields. Maybe shouldn't I try to mimic C api and find a more convenient way to access fields of such structures from S-lang.

Thanks,


Laurent.






[2008 date index] [2008 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]