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

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

Thread Previous | Thread Next
From:
Gurusamy Sarathy
Date:
October 28, 2001 17:12
Subject:
Re: [PATCH h2xs] Use of static data in XS modules
Message ID:
200110290111.f9T1BB107358@smtp3.ActiveState.com
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,

s/omit-//

>+ 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;
>+
>+ START_MY_CXT
>+
>+ END


Sarathy
gsar@ActiveState.com

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