Page 1 of 1

Question on pointers and importing of shared libraries

Posted: Sat Jan 17, 2009 5:39 pm
by 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!

Posted: Sun Jan 18, 2009 12:53 pm
by Lutz
See here:

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.

Posted: Sun Jan 18, 2009 5:42 pm
by Jeff
I just wrote a tutorial on using newlisp's ffi: http://www.artfulcode.net/articles/usin ... wlisp-ffi/. That might be worth looking at.