Question on pointers and importing of shared libraries

Started by methodic, January 17, 2009, 09:39:26 AM

Previous topic - Next topic

methodic

What is the method of referencing/retrieving the data in a (char **) pointer? I have successfully used (get-string) when trying to reference a (char *), but no such luck with the other. I tried various calls to address with no luck. Is this even possible?



Thanks in advance!

Lutz

#1
See here:



http://www.newlisp.org/CodePatterns.html#extending">http://www.newlisp.org/CodePatterns.html#extending



look at the last row in both tables at the end of the chapter. Note that in C, char ** foo is the same as char * foo[].



If you are not familiar with the C language and how pointers in C work, try to find an experienced C programmer to help you.

Jeff

#2
I just wrote a tutorial on using newlisp's ffi: http://www.artfulcode.net/articles/using-the-newlisp-ffi/">http://www.artfulcode.net/articles/usin ... wlisp-ffi/">http://www.artfulcode.net/articles/using-the-newlisp-ffi/. That might be worth looking at.
Jeff

=====

Old programmers don\'t die. They just parse on...



http://artfulcode.net\">Artful code