This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: new snarf macro: SCM_VAR
- To: Dirk Herrmann <dirk at ida dot ing dot tu-bs dot de>
- Subject: Re: new snarf macro: SCM_VAR
- From: Marius Vollmer <mvo at zagadka dot ping dot de>
- Date: 05 May 2000 22:07:58 +0200
- Cc: Keisuke Nishida <kxn30 at po dot cwru dot edu>, guile at sourceware dot cygnus dot com
- References: <Pine.LNX.4.21.0005051044530.22781-100000@marvin.ida.ing.tu-bs.de>
Dirk Herrmann <dirk@ida.ing.tu-bs.de> writes:
> I think adding such a macro would be a good idea. You would have to
> protect the variable contents from gc, though.
Yes, and you should be careful to really protect whatever is currently
in the variable, and not only protect the object that the variable was
initialized with.
> However, I do have some problems with the current naming of all these
> snarfing macros:
> * I'd prefer a common prefix like SCM_DECLARE_, for example
> SCM_DECLARE_FUNCTION or something.
> * To me it is strange that a declaration SCM_SYMBOL will generate a static
> definition, while SCM_GLOBAL_SYMBOL will provide a non-static one. I'd
> prefer SCM_DECLARE_STATIC_... for static definitions, because that's the
> way a C programmer thinks.
>
> Do others feel the same way?
Yes. I prefer Keisuke's names, tho.