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:
Paul Marquess
Date:
October 29, 2001 03:40
Subject:
RE: [PATCH h2xs] Use of static data in XS modules
Message ID:
AIEAJICLCBDNAAOLLOKLEEIHDDAA.Paul_Marquess@Yahoo.co.uk
From: Gurusamy Sarathy [mailto:gsar@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 //

ok.

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

ok.

> >+ 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.

Good point.

> >+ } my_cxt_t;
> >+
> >+ START_MY_CXT
> >+
> >+ END
>
>
> Sarathy
> gsar@ActiveState.com


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.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