develooper Front page | perl.perl6.internals | Postings from April 2001

Re: Perl_foo() vs foo() etc

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
April 11, 2001 08:04
Subject:
Re: Perl_foo() vs foo() etc
Message ID:
5.0.2.1.0.20010411110331.019d9be0@24.8.96.48
At 11:00 AM 4/11/2001 -0400, Bryan C. Warnock wrote:
>Okay, I *really* may have missed something....
>
>Do you mean this:
>
>/* Allow us to refer to _Perl_foo() as just foo() inside */
>#define _Perl_foo foo
>
>or this:
>
>/* We're foo(), other folks can call us _Perl_foo() */
>#define foo _Perl_foo
>
>The second is what I read from your list, although the first seems like more
>what you're talking about.

The second is the one I'm talking about.

> > > > *) All exported perl functions and functionlike things have a Perl_
> > > > prefix *) All exported data and dataish thigns have a PL_ prefix
> > > > *) All private routines have #defines to give them a _Perl_ prefix
> > > > *) All private data have #defines to give them a _PL_ prefix
> > > > *) Internal data and functions get referenced via the unqualified names
> > > >
> > > > That way the internals can use the utility function str_to_UTF(), while
> > > > the world would see it (or, rather, not see it) as _Perl_str_to_UTF().
> > > > Less typing for private things, and more for the much smaller (and
> > > > probably not used internally) set of public functions.
> >
>
>--
>Bryan C. Warnock
>bwarnock@capita.com


					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About