Re: Anyone understand this?
"David McClain (as dbm at refined-audiometrics dot com)" <[email protected]>
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
You have to first unregister the module before reloading. This is often useful when you are developing the external C, or whatever, library routine. You can also just exit the Lisp session and begin again. But unregister module makes it so that you don’t have to do that. You might also need to recompile the interface routines. I don’t know if they keep any internal state that needs to be reset. From the looks of some of the expansions I did earlier, I think LW had enough forethought to centralize the connections to the external libs. > On Jan 22, 2025, at 17:19, Yuri Davidovsky (as work at disclosure dot ie) <[email protected]> wrote: > >> On 22 Jan 2025, at 20:48, David McClain <[email protected]> wrote: >> >> Here is properly working code, just FYI > > Looks tidy. You have a curious way of declaring a module, I thought you had to do it before hand using (register-module). Also, I have a question that I can’t find a good answer to on my own: > > how do you reload the module properly without breaking anything? > > Say I am developing a C routine to be called from lisp, but I want to extend it with another function. I edit the C code, compile the file, produce a dynamic lib and overwrite the old one. Naturally, the new function is not going to be available in the lisp runtime just like that. > > How do I gracefully get rid of the existing connection to the foreign lib and recreate it? > > _______________________________________________ > Lisp Hug - the mailing list for LispWorks users > [email protected] > http://www.lispworks.com/support/lisp-hug.html _______________________________________________ Lisp Hug - the mailing list for LispWorks users [email protected] http://www.lispworks.com/support/lisp-hug.html