On Sun, Jun 14, 2009 at 06:36:56PM +0200, Gubinelli Massimiliano wrote:
> Hi Norbert,
>  I'm not sure about the behaviour of static variables in inline  
> functions. What about the following code?
> 
> extern url url_none_constant;
> 
> inline url url_none () { if (is_nil(url_none_constant))  
> url_none_constant = as_url (tree("none")); return url_none_constant; }
> inline bool is_none (url u) { return u->t == url_none()->t; }

I think that this is the kind of code generated by the compiler.
A boolean is used for indicating whether the static variable is used for
the first time. This probably remains correct for inline routines,
but it is true that I am not sure.

I will implement something else.

Best wishes, Joris


_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev

Reply via email to