Question on pointers and importing of shared libraries

Notices and updates
Locked
methodic
Posts: 58
Joined: Tue May 10, 2005 5:04 am

Question on pointers and importing of shared libraries

Post 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!

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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.

Jeff
Posts: 604
Joined: Sat Apr 07, 2007 2:23 pm
Location: Ohio
Contact:

Post 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.
Jeff
=====
Old programmers don't die. They just parse on...

Artful code

Locked