[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Problem with Compilation of work4 on Darwin/MacOSX
- From: Björn De Meyer <bjorn.demeyer@...>
- Date: Wed, 20 Mar 2002 16:39:16 +0100
Roberto Ierusalimschy wrote:
>
> > I found now, that the predefined _G is defined in the Standard ctype.h
> > in Darwin/MacOSX
>
> > This header seems to be the standard header file in BSD-Systems so
> > i suggest to rename the field in the lua_State struct and in the
> > correspondig references!
>
> Thanks for the warning. We will change that. (Actually we will avoid
> the use of any name starting with '_'.)
>
> -- Roberto
Well, that may not be needed entirely, AFAIK, according
to the ANSI C standard, only names beginning with two underscores
or names beginning with with one underscore followed by a capital
letter are reserved for the internal use of standard libraries.
/Normally/ you should be able to use names that begin with a
single underscore followed by a lowercase letter without problems.
The problem with the predefined _G on MacOSX simply boils
down to a conflict of lua C code with the ANSI standard. But,
using something like _g, or better still, _lua_g, is acceptable
and does not violate tthe C standard.
--
"No one knows true heroes, for they speak not of their greatness." --
Daniel Remar.
Björn De Meyer
bjorn.demeyer@pandora.be