line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#pragma once |
2
|
|
|
|
|
|
|
#include "base.h" |
3
|
|
|
|
|
|
|
#include "../Simple.h" |
4
|
|
|
|
|
|
|
#include |
5
|
|
|
|
|
|
|
#include |
6
|
|
|
|
|
|
|
#include |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
namespace xs { |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
template <> struct Typemap : TypemapBase { |
11
|
26
|
|
|
|
|
|
static inline panda::string in (pTHX_ SV* arg) { |
12
|
|
|
|
|
|
|
STRLEN len; |
13
|
26
|
50
|
|
|
|
|
const char* data = SvPV_nomg(arg, len); |
|
|
0
|
|
|
|
|
|
14
|
26
|
50
|
|
|
|
|
return panda::string(data, len); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
static inline Sv out (pTHX_ const panda::string& str, const Sv& = Sv()) { return Simple(str); } |
17
|
|
|
|
|
|
|
}; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
template <> struct Typemap : TypemapBase { |
20
|
|
|
|
|
|
|
static inline std::string in (pTHX_ SV* arg) { |
21
|
|
|
|
|
|
|
STRLEN len; |
22
|
|
|
|
|
|
|
const char* data = SvPV_nomg(arg, len); |
23
|
|
|
|
|
|
|
return std::string(data, len); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
static inline Sv out (pTHX_ const std::string& str, const Sv& = Sv()) { return Simple(panda::string_view(str.data(), str.length())); } |
26
|
|
|
|
|
|
|
}; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
template <> struct Typemap : TypemapBase { |
29
|
108
|
|
|
|
|
|
static inline panda::string_view in (pTHX_ SV* arg) { |
30
|
|
|
|
|
|
|
STRLEN len; |
31
|
108
|
50
|
|
|
|
|
const char* data = SvPV_nomg(arg, len); |
|
|
0
|
|
|
|
|
|
32
|
108
|
|
|
|
|
|
return panda::string_view(data, len); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
static inline Sv out (pTHX_ const panda::string_view& str, const Sv& = Sv()) { return Simple(str); } |
35
|
|
|
|
|
|
|
}; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
} |