It is therefore strongly recommended that these macros be used by all
XS modules that make use of static data.
-The easiest way to get a template set of macros to use is by specifiying
+The easiest way to get a template set of macros to use is by specifying
the C<-g> (C<--global>) option with h2xs (see L<h2xs>).
Below is an example module that makes use of the macros.
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
-
+
/* Global Data */
-
+
#define MY_CXT_KEY "BlindMice::_guts" XS_VERSION
-
+
typedef struct {
int count;
char name[3][100];
} my_cxt_t;
-
+
START_MY_CXT
-
+
MODULE = BlindMice PACKAGE = BlindMice
-
+
BOOT:
{
MY_CXT_INIT;