This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: new snarf macro: SCM_VAR


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]