[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Building C Libraries with chicken
From: |
Christian Kellermann |
Subject: |
Re: [Chicken-users] Building C Libraries with chicken |
Date: |
Wed, 1 Sep 2010 14:13:43 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
* felix winkelmann <address@hidden> [100901 14:00]:
> From: Christian Kellermann <address@hidden>
> Subject: Re: [Chicken-users] Building C Libraries with chicken
> Date: Wed, 1 Sep 2010 13:42:00 +0200
>
> > * felix winkelmann <address@hidden> [100901 13:34]:
> >> int main(int argc, char *argv[])
> >> {
> >> CHICKEN_run((void *)C_toplevel);
> >> yo_dawg();
> >> return 0;
> >> }
> >
> > Thanks for the excellent (and fast) reply! Despite the laugh I
> > always get when seeing CHICKEN_run(), what's the necessity to call
> > this?
>
> To initialize the runtime system and run the toplevel code once
> (In Scheme, there is no `main()', so the toplevel expressions must
> be executed).
I see! Is there anything I need to call to cleanup the runtime
system again? I am asking all this because I want to hide even
that from the user of this library. So I would wrap the CHICKEN_run(!)
into an init() function of some sort and have the user call that
instead. I could provide a cleanup() function as well, if that's
needed.
Look Ma, no scheme involved!
This is all part of the Scheme Underground plan to take over the world!
;)
Christian