At 03:47 PM 4/11/2001 -0500, Jarkko Hietaniemi wrote:
>On Wed, Apr 11, 2001 at 04:38:21PM -0400, Dan Sugalski wrote:
> > At 03:09 PM 4/11/2001 -0400, John Siracusa wrote:
> > >On 4/11/01 10:55 AM, Dan Sugalski wrote:
> > > > It does fix the link issues, though. perl6.so won't ever have an
> > > > unqualified function in it--they'll all have either a Perl_ or _Perl_
> > > > prefix on them, and all global data will have a PL_ prefix on it.
> > >
> > >Remind me again why it's PL_ and not PERL_?
> >
> > Well, Perl_ and PERL_ won't work, since that's relying on case-sensitivity
> > in the various linkers, which is a Bad Thing. Having Perl_ and PL_ to
> > separate code and data is in there mainly to make separating things
> > programmatically easier. We could, I suppose, make everything Perl_ and
> > have a config file somewhere with the type (data/code/whatever) indicated.
> >
> > That's probably the best thing--since we're exporting only a reasonably 
> few
> > things, and only explicitly, it ought to be OK.
>
>I would say that everything could/should be hidden behind code, no naked
>exported data if at all possible.

I was generally dividing things up into code stuff (macros and function 
calls) and data stuff (typedefs, structs, and maybe pointers to things). I 
agree that we shouldn't expose any of our internal data

>As far as the code is concerned, keeping the number of arguments small
>and preferring pointers (to structs or void) instead of a list of
>naked native types helps portability and extensibility.

Speed, too, at least a little bit.

>The distinction between public/embedding/private APIs also needs to be
>followed fervently.

And violently. I fully intend to use both VMS' "If it's not explicitly 
exported you can't see it" linker complaints along with scans of exported 
symbols on some of the Unix platforms to keep this in check.

If anyone knows of a portable (or at least semi-portable) way to restrict 
what symbols get exported in shared libraries on Unix systems, I'm all for 
using it.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to