ext/XS-APItest/numeric.xs | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 6 | 6 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | n/a | ||
total | 6 | 6 | 100.0 |
line | stmt | bran | cond | sub | time | code |
---|---|---|---|---|---|---|
1 | MODULE = XS::APItest PACKAGE = XS::APItest::numeric | |||||
2 | ||||||
3 | void | |||||
4 | grok_number(number) | |||||
5 | SV *number | |||||
6 | PREINIT: | |||||
7 | STRLEN len; | |||||
8 | 7182 | const char *pv = SvPV(number, len); | ||||
9 | UV value; | |||||
10 | int result; | |||||
11 | PPCODE: | |||||
12 | 7182 | EXTEND(SP,2); | ||||
13 | 7182 | result = grok_number(pv, len, &value); | ||||
14 | 7182 | PUSHs(sv_2mortal(newSViv(result))); | ||||
15 | 7182 | if (result & IS_NUMBER_IN_UV) | ||||
16 | 7094 | PUSHs(sv_2mortal(newSVuv(value))); |