[m-dev.] for review: Underscore vars in pragma c code arguments (round 2)

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Aug 5 18:05:03 AEST 1998


On 05-Aug-1998, Andrew Bromage <bromage at cs.mu.OZ.AU> wrote:
> 
> Do not generate C code for pragma c_code argument variables which begin
> with an underscore.  This avoids possible clashes with the system
> namespace.  (We shouldn't declare any C identifiers which begin with an
> underscore.)

That looks fine now, but I do have one comment:
the following code fragment occurs often, so it is probably
better to abstract that out into a procedure.

> +                ArgName = yes(Name),
> +
> +                        % If the first char of the variable is an
> +                        % underscore, we should ignore it since:
> +                        %       - it should not appear in the C code
> +                        %       - it could clash with the system name
> +                        %         space
> +                \+ string__first_char(Name, '_', _)

--
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list