1 /* This file is part of the Test::Valgrind Perl module.
2 * See http://search.cpan.org/dist/Test::Valgrind/ */
4 #define PERL_NO_GET_CONTEXT
9 #define __PACKAGE__ "Test::Valgrind"
12 # define Newx(v, n, c) New(0, v, n, c)
19 const char *tv_leaky = NULL;
21 /* malloc() on Windows needs the current interpreter. */
23 #ifdef PERL_IMPLICIT_SYS
24 # define TV_LEAK_PROTO pTHX
25 # define TV_LEAK_ARG aTHX
27 # define TV_LEAK_PROTO void
31 extern void tv_leak(TV_LEAK_PROTO);
33 extern void tv_leak(TV_LEAK_PROTO) {
34 tv_leaky = malloc(10000);
39 /* --- XS ------------------------------------------------------------------ */
41 MODULE = Test::Valgrind PACKAGE = Test::Valgrind
47 HV *stash = gv_stashpv(__PACKAGE__, 1);
48 newCONSTSUB(stash, "DEBUGGING", newSVuv(DEBUGGING));
60 Newx(tv_leaky, 10000, char);