This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Rename ext/Devel/DProf to ext/Devel-DProf
[perl5.git] / ext / Devel / PPPort / module2.c
1 /*******************************************************************************
2 *
3 *  Perl/Pollution/Portability
4 *
5 ********************************************************************************
6 *
7 *  $Revision: 12 $
8 *  $Author: mhx $
9 *  $Date: 2009/01/18 14:10:49 +0100 $
10 *
11 ********************************************************************************
12 *
13 *  Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz.
14 *  Version 2.x, Copyright (C) 2001, Paul Marquess.
15 *  Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
16 *
17 *  This program is free software; you can redistribute it and/or
18 *  modify it under the same terms as Perl itself.
19 *
20 *******************************************************************************/
21
22 #include "EXTERN.h"
23 #include "perl.h"
24 #include "XSUB.h"
25
26 #ifndef PATCHLEVEL
27 #include "patchlevel.h"
28 #endif
29
30 #define NEED_newCONSTSUB_GLOBAL
31 #define NEED_PL_signals_GLOBAL
32 #define NEED_PL_parser
33 #define DPPP_PL_parser_NO_DUMMY
34 #include "ppport.h"
35
36 void call_newCONSTSUB_2(void)
37 {
38   newCONSTSUB(gv_stashpv("Devel::PPPort", FALSE), "test_value_2", newSViv(2));
39 }
40
41 U32 get_PL_signals_2(void)
42 {
43   return PL_signals;
44 }
45
46 int no_dummy_parser_vars(int check)
47 {
48   if (check == 0 || PL_parser)
49   {
50     line_t volatile my_copline;
51     line_t volatile *my_p_copline;
52     my_copline = PL_copline;
53     my_p_copline = &PL_copline;
54     PL_copline = my_copline;
55     PL_copline = *my_p_copline;
56     return 1;
57   }
58
59   return 0;
60 }