-/* This file is part of the Scalar::Vec::Util Perl module.
- * See http://search.cpan.org/dist/Scalar-Vec-Util/ */
+/* This file is part of the Test::Valgrind Perl module.
+ * See http://search.cpan.org/dist/Test::Valgrind/ */
#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
const char *tv_leaky = NULL;
+extern void tv_leak(void) {
+ tv_leaky = malloc(10000);
+
+ return;
+}
+
/* --- XS ------------------------------------------------------------------ */
MODULE = Test::Valgrind PACKAGE = Test::Valgrind
void
leak()
CODE:
- tv_leaky = malloc(10000);
+ tv_leak();
XSRETURN_UNDEF;
SV *