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

Re: [PATCH h2xs] Use of static data in XS modules

Thread Previous | Thread Next
Gurusamy Sarathy
October 28, 2001 17:12
Re: [PATCH h2xs] Use of static data in XS modules
Message ID:
On Sun, 28 Oct 2001 21:19:07 GMT, "Paul Marquess" wrote:
>following on from Sarathy's blitz on the modules to fix the use of static
>data in XS modules, I enclose a patch that gets h2xs to optionally generate
>the new CXT* macros.
>I've made this generation default to off. It is enabled with the -g option.

Looks good except for some typos.  Thanks!

>+ Include code for safely storing static data in the .xs file.
>+ Extensions that do no make use of static data can specify ignore this option.

s/specify //

>+                 'omit-global|g'      =3D> \$opt_g,


>+ typedef struct {
>+     /* Put Global Data in here */

Might want a

 +     int dummy;       /* you can access this elsewhere as MY_CXT.dummy */

in here, to make it compile without incident with some compilers.

>+ } my_cxt_t;
>+ END


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About