c-implementation of newlisp functions?

For the Compleat Fan
Locked
starseed
Posts: 38
Joined: Thu Jul 27, 2006 8:45 pm

c-implementation of newlisp functions?

Post by starseed »

Hi,

what do I have to do, if I want to add a new function to newlisp, with an implementation on the C-side of things?

I guess I've found out, that, e.g. p_and in newlisp.c is the implementation of and in newlisp. But I'm missing the link between the two.

Where do I have to look?

TIA,

Ingo

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

Post by Lutz »

The easiest method to expand newLISP is to write a C-library and then import the function. newLISP's C-library interface is very tight and gives you as much performance as a built-in.

Look into chapter 19: http://newlisp.org/DesignPatterns.html#extending

for details. If you need help, how to compile and import your C-function, let me know.

Lutz

Locked