develooper Front page | perl.perl5.porters | Postings from January 2001

Re: [patch] static-ize XS()

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
January 1, 2001 14:59
Subject:
Re: [patch] static-ize XS()
Message ID:
E14DDsk-0002rd-00@roam1
Doug Maceachern <dougm@covalent.net> writes:
>any reason XS() functions should not be static?  

Yes at least two:
  A. the B::C compiler expects to be be able to init data structures
     with their names.
  B. Some of us (e.g. Tk) call XS functions from other files

>the only one dlsym()
>needs to see is boot_$module_name.  the patch also protoypes the boot_
>function (i'm compiling with various -W's including -Werror)
>
>--- lib/ExtUtils/xsubpp~	Wed Nov 29 06:44:31 2000
>+++ lib/ExtUtils/xsubpp	Mon Jan  1 11:42:20 2001
>@@ -1183,7 +1183,7 @@
> 
>     # print function header
>     print Q<<"EOF";
>-#XS(XS_${Full_func_name})
>+#static XS(XS_${Full_func_name})
> #[[
> #    dXSARGS;
> EOF
>@@ -1502,6 +1502,7 @@
> EOF
> 
> print Q<<"EOF";
>+#XS(boot_$Module_cname);
> #XS(boot_$Module_cname)
> EOF
-- 
Nick Ing-Simmons


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