lib/Tickit/Async.c

filter: Statementstmt 0.0% 0 / 4 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 4 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/lib/Tickit/Async.pm ↑ Summary
1 /*
2 * This file was generated automatically by ExtUtils::ParseXS version 3.63 from the
3 * contents of Async.xs. Do not edit this file, edit Async.xs instead.
4 *
5 * ANY CHANGES MADE HERE WILL BE LOST!
6 *
7 */
8  
9 #line 1 "lib/Tickit/Async.xs"
10 /* You may distribute under the terms of either the GNU General Public License
11 * or the Artistic License (the same terms as Perl itself)
12 *
13 * (C) Paul Evans, 2019 -- leonerd@leonerd.org.uk
14 */
15  
16  
17 #include "EXTERN.h"
18 #include "perl.h"
19 #include "XSUB.h"
20  
21 /* This file intentionally left blank in order to work around the problem of
22 * changing CPAN dists from XS to PP and overwriting old files
23 */
24  
25 #line 26 "lib/Tickit/Async.c"
26 #ifndef PERL_UNUSED_VAR
27 # define PERL_UNUSED_VAR(var) if (0) var = var
28 #endif
29  
30 #ifndef dVAR
31 # define dVAR dNOOP
32 #endif
33  
34  
35 /* This stuff is not part of the API! You have been warned. */
36 #ifndef PERL_VERSION_DECIMAL
37 # define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s)
38 #endif
39 #ifndef PERL_DECIMAL_VERSION
40 # define PERL_DECIMAL_VERSION \
41 PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION)
42 #endif
43 #ifndef PERL_VERSION_GE
44 # define PERL_VERSION_GE(r,v,s) \
45 (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s))
46 #endif
47 #ifndef PERL_VERSION_LE
48 # define PERL_VERSION_LE(r,v,s) \
49 (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s))
50 #endif
51  
52 /* XS_INTERNAL is the explicit static-linkage variant of the default
53 * XS macro.
54 *
55 * XS_EXTERNAL is the same as XS_INTERNAL except it does not include
56 * "static", ie. it exports XSUB symbols. You probably don't want that
57 * for anything but the BOOT XSUB.
58 *
59 * See XSUB.h in core!
60 */
61  
62  
63 /* TODO: This might be compatible further back than 5.10.0. */
64 #if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1)
65 # undef XS_EXTERNAL
66 # undef XS_INTERNAL
67 # if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
68 # define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name)
69 # define XS_INTERNAL(name) static XSPROTO(name)
70 # endif
71 # if defined(__SYMBIAN32__)
72 # define XS_EXTERNAL(name) EXPORT_C XSPROTO(name)
73 # define XS_INTERNAL(name) EXPORT_C static XSPROTO(name)
74 # endif
75 # ifndef XS_EXTERNAL
76 # if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
77 # define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
78 # define XS_INTERNAL(name) static void name(pTHX_ CV* cv __attribute__unused__)
79 # else
80 # ifdef __cplusplus
81 # define XS_EXTERNAL(name) extern "C" XSPROTO(name)
82 # define XS_INTERNAL(name) static XSPROTO(name)
83 # else
84 # define XS_EXTERNAL(name) XSPROTO(name)
85 # define XS_INTERNAL(name) static XSPROTO(name)
86 # endif
87 # endif
88 # endif
89 #endif
90  
91 /* perl >= 5.10.0 && perl <= 5.15.1 */
92  
93  
94 /* The XS_EXTERNAL macro is used for functions that must not be static
95 * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL
96 * macro defined, the best we can do is assume XS is the same.
97 * Dito for XS_INTERNAL.
98 */
99 #ifndef XS_EXTERNAL
100 # define XS_EXTERNAL(name) XS(name)
101 #endif
102 #ifndef XS_INTERNAL
103 # define XS_INTERNAL(name) XS(name)
104 #endif
105  
106 /* Now, finally, after all this mess, we want an ExtUtils::ParseXS
107 * internal macro that we're free to redefine for varying linkage due
108 * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use
109 * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to!
110 */
111  
112 #undef XS_EUPXS
113 #if defined(PERL_EUPXS_ALWAYS_EXPORT)
114 # define XS_EUPXS(name) XS_EXTERNAL(name)
115 #else
116 /* default to internal */
117 # define XS_EUPXS(name) XS_INTERNAL(name)
118 #endif
119  
120 #ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
121 #define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)
122  
123 /* prototype to pass -Wmissing-prototypes */
124 static void
125 S_croak_xs_usage(const CV *const cv, const char *const params);
126  
127 static void
128 S_croak_xs_usage(const CV *const cv, const char *const params)
129 {
130 const GV *const gv = CvGV(cv);
131  
132 PERL_ARGS_ASSERT_CROAK_XS_USAGE;
133  
134 if (gv) {
135 const char *const gvname = GvNAME(gv);
136 const HV *const stash = GvSTASH(gv);
137 const char *const hvname = stash ? HvNAME(stash) : NULL;
138  
139 if (hvname)
140 Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params);
141 else
142 Perl_croak_nocontext("Usage: %s(%s)", gvname, params);
143 } else {
144 /* Pants. I don't think that it should be possible to get here. */
145 Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params);
146 }
147 }
148 #undef PERL_ARGS_ASSERT_CROAK_XS_USAGE
149  
150 #define croak_xs_usage S_croak_xs_usage
151  
152 #endif
153  
154 /* NOTE: the prototype of newXSproto() is different in versions of perls,
155 * so we define a portable version of newXSproto()
156 */
157 #ifdef newXS_flags
158 #define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
159 #else
160 #define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
161 #endif /* !defined(newXS_flags) */
162  
163 #if PERL_VERSION_LE(5, 21, 5)
164 # define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file)
165 #else
166 # define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b)
167 #endif
168  
169 /* simple backcompat versions of the TARGx() macros with no optimisation */
170 #ifndef TARGi
171 # define TARGi(iv, do_taint) sv_setiv_mg(TARG, iv)
172 # define TARGu(uv, do_taint) sv_setuv_mg(TARG, uv)
173 # define TARGn(nv, do_taint) sv_setnv_mg(TARG, nv)
174 #endif
175  
176 #line 177 "lib/Tickit/Async.c"
177 #ifdef __cplusplus
178 extern "C" {
179 #endif
180 XS_EXTERNAL(boot_Tickit__Async); /* prototype to pass -Wmissing-prototypes */
181 0 XS_EXTERNAL(boot_Tickit__Async)
182 {
183 #if PERL_VERSION_LE(5, 21, 5)
184 dVAR; dXSARGS;
185 #else
186 0 dVAR; dXSBOOTARGSXSAPIVERCHK;
187 #endif
188  
189 PERL_UNUSED_VAR(cv); /* -W */
190 PERL_UNUSED_VAR(items); /* -W */
191 #if PERL_VERSION_LE(5, 21, 5)
192 XS_VERSION_BOOTCHECK;
193 # ifdef XS_APIVERSION_BOOTCHECK
194 XS_APIVERSION_BOOTCHECK;
195 # endif
196 #endif
197  
198 #if PERL_VERSION_LE(5, 21, 5)
199 # if PERL_VERSION_GE(5, 9, 0)
200 if (PL_unitcheckav)
201 call_list(PL_scopestack_ix, PL_unitcheckav);
202 # endif
203 XSRETURN_YES;
204 #else
205 0 Perl_xs_boot_epilog(aTHX_ ax);
206 #endif
207 0 }
208  
209 #ifdef __cplusplus
210 }
211 #endif
« blib/lib/Tickit/Async.pm ↑ Summary