[slang-users] Creating nested structures

Laurent Perez laurent.perez at unicaen.fr
Sat Sep 6 13:24:19 UTC 2008


"John E. Davis" <davis at space.mit.edu> 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.





More information about the slang-users-l mailing list