newLISP Fan Club

Forum => Anything else we might add? => Topic started by: starseed on July 29, 2006, 03:15:00 PM

Title: c-implementation of newlisp functions?
Post by: starseed on July 29, 2006, 03:15:00 PM
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
Title:
Post by: Lutz on July 29, 2006, 03:28:14 PM
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