1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * This file was generated automatically by ExtUtils::ParseXS version 2.18_02 from the
4  * contents of Context.xs. Do not edit this file, edit Context.xs instead.
5  *
6  *	ANY CHANGES MADE HERE WILL BE LOST!
7  */
8 #include <stdbool.h>
9 #ifndef HAS_BOOL
10 # define HAS_BOOL 1
11 #endif
12 #line 1 "Context.xs"
13 /*
14  * Context.xs.  XS interfaces for perf script.
15  *
16  * Copyright (C) 2009 Tom Zanussi <tzanussi@gmail.com>
17  */
18 
19 #include "EXTERN.h"
20 #include "perl.h"
21 #include "XSUB.h"
22 #include "../../../perf.h"
23 #include "../../../util/trace-event.h"
24 
25 #ifndef PERL_UNUSED_VAR
26 #  define PERL_UNUSED_VAR(var) if (0) var = var
27 #endif
28 
29 #line 42 "Context.c"
30 
31 XS(XS_Perf__Trace__Context_common_pc); /* prototype to pass -Wmissing-prototypes */
32 XS(XS_Perf__Trace__Context_common_pc)
33 {
34 #ifdef dVAR
35     dVAR; dXSARGS;
36 #else
37     dXSARGS;
38 #endif
39     if (items != 1)
40        Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_pc", "context");
41     PERL_UNUSED_VAR(cv); /* -W */
42     {
43 	struct scripting_context *	context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
44 	int	RETVAL;
45 	dXSTARG;
46 
47 	RETVAL = common_pc(context);
48 	XSprePUSH; PUSHi((IV)RETVAL);
49     }
50     XSRETURN(1);
51 }
52 
53 
54 XS(XS_Perf__Trace__Context_common_flags); /* prototype to pass -Wmissing-prototypes */
55 XS(XS_Perf__Trace__Context_common_flags)
56 {
57 #ifdef dVAR
58     dVAR; dXSARGS;
59 #else
60     dXSARGS;
61 #endif
62     if (items != 1)
63        Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_flags", "context");
64     PERL_UNUSED_VAR(cv); /* -W */
65     {
66 	struct scripting_context *	context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
67 	int	RETVAL;
68 	dXSTARG;
69 
70 	RETVAL = common_flags(context);
71 	XSprePUSH; PUSHi((IV)RETVAL);
72     }
73     XSRETURN(1);
74 }
75 
76 
77 XS(XS_Perf__Trace__Context_common_lock_depth); /* prototype to pass -Wmissing-prototypes */
78 XS(XS_Perf__Trace__Context_common_lock_depth)
79 {
80 #ifdef dVAR
81     dVAR; dXSARGS;
82 #else
83     dXSARGS;
84 #endif
85     if (items != 1)
86        Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_lock_depth", "context");
87     PERL_UNUSED_VAR(cv); /* -W */
88     {
89 	struct scripting_context *	context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
90 	int	RETVAL;
91 	dXSTARG;
92 
93 	RETVAL = common_lock_depth(context);
94 	XSprePUSH; PUSHi((IV)RETVAL);
95     }
96     XSRETURN(1);
97 }
98 
99 #ifdef __cplusplus
100 extern "C"
101 #endif
102 XS(boot_Perf__Trace__Context); /* prototype to pass -Wmissing-prototypes */
103 XS(boot_Perf__Trace__Context)
104 {
105 #ifdef dVAR
106     dVAR; dXSARGS;
107 #else
108     dXSARGS;
109 #endif
110     const char* file = __FILE__;
111 
112     PERL_UNUSED_VAR(cv); /* -W */
113     PERL_UNUSED_VAR(items); /* -W */
114     XS_VERSION_BOOTCHECK ;
115 
116         newXSproto("Perf::Trace::Context::common_pc", XS_Perf__Trace__Context_common_pc, file, "$");
117         newXSproto("Perf::Trace::Context::common_flags", XS_Perf__Trace__Context_common_flags, file, "$");
118         newXSproto("Perf::Trace::Context::common_lock_depth", XS_Perf__Trace__Context_common_lock_depth, file, "$");
119     if (PL_unitcheckav)
120          call_list(PL_scopestack_ix, PL_unitcheckav);
121     XSRETURN_YES;
122 }
123 
124