On Sun, 14 Jul 2013 00:31:27 +0900
Dietrich Bollmann <dietr...@formgames.org> wrote:

> I compiled my ECL lisp functions with asdf:make-build into a library.
> 
> Some functions depend on the value of a global variable which has to be set
> in the code using the library.
> 
> But when changing the value of the global variable in the code using the
> library, the library functions still use the old value...

I don't really understand why in your example code only the original
value is obtained, possibly that the scope of the variable is not the
expected one (that there are two such variables or such)?  I recommend
to use (setf c::*delete-files* nil) and to inspect the resulting C code.

Note also that for handling foreign pointers (other than :pointer-void
with C-INLINE which it handles implicitely), there are the public
interfaces ecl_make_pointer() and ecl_to_pointer().

In your next message I see that you seem to be doing it right to store
the context in a C variable (although I didn't test your code).  If
it's to store a unique global context on which the Lisp code should
have no control, it might not matter, but otherwise, it might be best
to have interface functions require the context parameter or to obtain
it from a dynamic/special variable, which would allow Lisp code to
handle multiple objects more elegantly than is generally possible from
C/C++ because of the power of dynamic scope...
-- 
Matt

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to