newLISP Fan Club

Forum => newLISP newS => Topic started by: methodic on January 17, 2009, 09:39:26 AM

Title: Question on pointers and importing of shared libraries
Post by: methodic on January 17, 2009, 09:39:26 AM
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!
Title:
Post by: Lutz on January 18, 2009, 04:53:10 AM
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.
Title:
Post by: Jeff on January 18, 2009, 09:42:03 AM
I just wrote a tutorial on using newlisp's ffi: http://www.artfulcode.net/articles/using-the-newlisp-ffi/. That might be worth looking at.