| 1 |
|
| # Doors for the tests only. |
| 2 |
|
| |
| 3 |
|
| MODULE = Time::Keeper::Zone PACKAGE = Time::Keeper::Zone |
| 4 |
|
| |
| 5 |
|
| # 2**62 + 1 worked out in int64_t and written out by hand, so the answer does |
| 6 |
|
| # not depend on the perl's IV or NV holding it. |
| 7 |
|
| SV * |
| 8 |
|
| _int64_probe() |
| 9 |
|
| PREINIT: |
| 10 |
|
| int64_t v; |
| 11 |
|
| char buf[24]; |
| 12 |
|
| char *p; |
| 13 |
|
| CODE: |
| 14 |
1 |
| v = ((int64_t)1 << 62) + 1; |
| 15 |
1 |
| p = buf + sizeof buf; |
| 16 |
1 |
| *--p = '\0'; |
| 17 |
19 |
▶ | do { *--p = (char)('0' + (int)(v % 10)); v /= 10; } while (v); |
Branch: 1 branch
| Branch | True | False | Total |
| do { *--p = (char)('0' + (int)(v % 10)); v /= 10; } while (v); |
18 |
1 |
19 |
|
| 18 |
1 |
| RETVAL = newSVpv(p, 0); |
| 19 |
|
| OUTPUT: |
| 20 |
|
| RETVAL |