src/xs/Scope.h

filter: Statementstmt 100% 4 / 4 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 100% 4 / 4 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/arch/XS/STL/ErrorCode.pm ↑ Summary src/xs/catch.h »
1 #pragma once
2 #include "Hash.h"
3 #include <panda/string_view.h>
4  
5 namespace xs {
6  
7 using xs::my_perl;
8  
9 struct Scope {
10 struct Hints {
11 static void set (panda::string_view name, const Sv& value);
12 static void remove (panda::string_view name);
13  
14 5 static bool exists (panda::string_view name) {
15 #if PERL_VERSION >= 34
16 5 return cop_hints_exists_pvn(PL_curcop, name.data(), name.length(), 0, 0);
17 #else
18 #ifndef REFCOUNTED_HE_EXISTS
19 #define REFCOUNTED_HE_EXISTS 0x00000002
20 #endif
21 return cop_hints_fetch_pvn(PL_curcop, name.data(), name.length(), 0, REFCOUNTED_HE_EXISTS);
22 #endif
23 }
24  
25 7 static Scalar get (panda::string_view name) {
26 7 return cop_hints_fetch_pvn(PL_curcop, name.data(), name.length(), 0, 0);
27 }
28  
29 static Hash get ();
30  
31 static Scalar get_ct (panda::string_view name);
32 };
33 };
34  
35 }
« blib/arch/XS/STL/ErrorCode.pm ↑ Summary src/xs/catch.h »