chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Re: srfi-47


From: felix
Subject: Re: [Chicken-users] Re: srfi-47
Date: Sat, 15 May 2004 01:48:18 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

Daniel B. Faken wrote:
Felix,

  By the way, a feature suggestion (noch einmal):
    * make the chicken_is_running variable available somehow

Ok.

    * allow another Easy-FFI keyword and foreign-lambdaXXXX mode
    which checks if chicken is currently running (i.e. from some
    entry point or as main()) and invokes an *embedded* version
    of the C code if it isn't.
      (the idea for the FFI is something like the current "__callback"
    keyword).

So, that one can differentiate between the two modes when C code is running
as a driver (i.e. toplevel) or whether it is invoked in a callback, right?

  I suggest this because I'm using chicken in embedded mode, and
sometimes I can't tell if I'm calling *back* into chicken, or
*invoking* chicken (and calling the wrong one crashes things..).
  I currently address this by having two copies of each of my exported
functions: one via 'define-embedded' and one via 'define-external'.
They all check my own version of the 'chicken_is_running' variable.
Currently there are only three fns, but this becomes a problem with more.
Have I overlooked an existing solution?

No, your request is very reasonable.


  I think this would be generally useful, too.. and unify embedded
entry points with the FFI interface.


I'll give it a look. Thanks for your suggestion!


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]