File Coverage

/usr/local/lib/perl5/site_perl/5.26.1/x86_64-linux/XS/Framework.x/i/xs/typemap/numeric.h
Criterion Covered Total %
statement 1 1 100.0
branch n/a
condition n/a
subroutine n/a
pod n/a
total 1 1 100.0


line stmt bran cond sub pod time code
1             #pragma once
2             #include "base.h"
3             #include "../Simple.h" // for _getnum()
4              
5             namespace xs {
6              
7             template struct TypemapNumeric : TypemapBase {
8             static inline TYPE in (SV* arg) { return detail::_getnum(arg); }
9 32           static inline Sv out (TYPE var, const Sv& = Sv()) { return Simple(var); }
10             };
11              
12             template <> struct Typemap : TypemapNumeric {};
13             template <> struct Typemap : TypemapNumeric {};
14             template <> struct Typemap : TypemapNumeric {};
15             template <> struct Typemap : TypemapNumeric {};
16             template <> struct Typemap : TypemapNumeric {};
17             template <> struct Typemap : TypemapNumeric {};
18             template <> struct Typemap : TypemapNumeric {};
19             template <> struct Typemap : TypemapNumeric {};
20             template <> struct Typemap : TypemapNumeric {};
21             template <> struct Typemap : TypemapNumeric {};
22             template <> struct Typemap : TypemapNumeric {};
23             template <> struct Typemap : TypemapNumeric {};
24              
25             template <> struct Typemap : TypemapBase {
26             static inline Sv out (bool var, const Sv& = {}) { return Simple(var); }
27             static inline bool in (Sv arg) { return arg.is_true(); }
28             };
29              
30             }