Fix [perl #66970] Incorrect coderef in MODIFY_CODE_ATTRIBUTES
[p5sagit/p5-mst-13.2.git] / ext / Devel-PPPort / module3.c
CommitLineData
adfe19db 1/*******************************************************************************
2*
3* Perl/Pollution/Portability
4*
5********************************************************************************
6*
51d6c659 7* $Revision: 12 $
adfe19db 8* $Author: mhx $
51d6c659 9* $Date: 2009/01/18 14:10:49 +0100 $
adfe19db 10*
11********************************************************************************
12*
51d6c659 13* Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz.
adfe19db 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*******************************************************************************/
0a7c7f4f 21
22#include "EXTERN.h"
23#include "perl.h"
2dd69576 24
c01be2ce 25#define NEED_PL_parser
2dd69576 26#define NO_XSLOCKS
0a7c7f4f 27#include "XSUB.h"
28
29#include "ppport.h"
30
2dd69576 31static void throws_exception(int throw_e)
32{
33 if (throw_e)
34 croak("boo\n");
35}
36
37int exception(int throw_e)
38{
39 dTHR;
40 dXCPT;
41 SV *caught = get_sv("Devel::PPPort::exception_caught", 0);
42
43 XCPT_TRY_START {
44 throws_exception(throw_e);
45 } XCPT_TRY_END
46
47 XCPT_CATCH
48 {
49 sv_setiv(caught, 1);
50 XCPT_RETHROW;
51 }
52
53 sv_setiv(caught, 0);
54
55 return 42;
56}
57
adfe19db 58void call_newCONSTSUB_3(void)
0a7c7f4f 59{
adfe19db 60 newCONSTSUB(gv_stashpv("Devel::PPPort", FALSE), "test_value_3", newSViv(3));
0a7c7f4f 61}
2dd69576 62
0d0f8426 63U32 get_PL_signals_3(void)
64{
65 return PL_signals;
66}
c01be2ce 67
68int dummy_parser_warning(void)
69{
70 char * volatile my_bufptr;
71 char * volatile *my_p_bufptr;
72 my_bufptr = PL_bufptr;
73 my_p_bufptr = &PL_bufptr;
74 PL_bufptr = my_bufptr;
75 PL_bufptr = *my_p_bufptr;
76 return &PL_bufptr != NULL;
77}