| line |
true |
false |
branch |
|
39
|
0 |
1121 |
XPUSHs(sv_2mortal(newSVpvn(str, 26))); |
|
54
|
0 |
11 |
XPUSHs(sv_2mortal(newSVpvn((const char *)bin, 16))); |
|
73
|
0 |
1730 |
XPUSHs(sv_2mortal(newSVpvn(str, 26))); |
|
89
|
0 |
52 |
XPUSHs(sv_2mortal(newSVpvn((const char *)bin, 16))); |
|
107
|
0 |
4 |
if (items < 1) croak("ulid_time requires 1 argument"); |
|
111
|
1 |
3 |
if (in_len == 16) { |
|
113
|
3 |
0 |
} else if (in_len == 26) { |
|
114
|
0 |
3 |
if (!sekhmet_ulid_decode(bin, in_str, 26)) |
|
121
|
0 |
4 |
XPUSHs(sv_2mortal(newSVnv(sekhmet_ulid_time(bin)))); |
|
137
|
0 |
14 |
if (items < 1) croak("ulid_time_ms requires 1 argument"); |
|
141
|
1 |
13 |
if (in_len == 16) { |
|
143
|
13 |
0 |
} else if (in_len == 26) { |
|
144
|
0 |
13 |
if (!sekhmet_ulid_decode(bin, in_str, 26)) |
|
154
|
0 |
14 |
if (ms > (uint64_t)IV_MAX) |
|
155
|
0 |
0 |
XPUSHs(sv_2mortal(newSVnv((NV)ms))); |
|
157
|
0 |
14 |
XPUSHs(sv_2mortal(newSViv((IV)ms))); |
|
175
|
0 |
8 |
if (items < 1) croak("ulid_to_uuid requires 1 argument"); |
|
179
|
1 |
7 |
if (in_len == 16) { |
|
181
|
7 |
0 |
} else if (in_len == 26) { |
|
182
|
0 |
7 |
if (!sekhmet_ulid_decode(bin, in_str, 26)) |
|
192
|
0 |
8 |
XPUSHs(sv_2mortal(newSVpvn(uuid_str, 36))); |
|
209
|
0 |
7 |
if (items < 1) croak("uuid_to_ulid requires 1 argument"); |
|
213
|
0 |
7 |
if (!sekhmet_uuid_to_ulid_bin(bin, in_str, (int)in_len)) |
|
220
|
0 |
7 |
XPUSHs(sv_2mortal(newSVpvn(str, 26))); |
|
237
|
0 |
42 |
if (items < 2) croak("ulid_compare requires 2 arguments"); |
|
243
|
0 |
42 |
if (a_len == 16) memcpy(a, a_str, 16); |
|
244
|
42 |
0 |
else if (a_len == 26) { |
|
245
|
0 |
42 |
if (!sekhmet_ulid_decode(a, a_str, 26)) |
|
250
|
0 |
42 |
if (b_len == 16) memcpy(b, b_str, 16); |
|
251
|
42 |
0 |
else if (b_len == 26) { |
|
252
|
0 |
42 |
if (!sekhmet_ulid_decode(b, b_str, 26)) |
|
259
|
0 |
42 |
XPUSHs(sv_2mortal(newSViv((cmp < 0) ? -1 : (cmp > 0) ? 1 : 0))); |
|
|
20 |
22 |
XPUSHs(sv_2mortal(newSViv((cmp < 0) ? -1 : (cmp > 0) ? 1 : 0))); |
|
274
|
0 |
128 |
if (items < 1) croak("ulid_validate requires 1 argument"); |
|
279
|
0 |
128 |
XPUSHs(sv_2mortal(newSViv(sekhmet_ulid_validate(in_str, (int)in_len)))); |
|
309
|
9 |
0 |
SEKHMET_REG_CK("ulid", ulid) |
|
310
|
9 |
0 |
SEKHMET_REG_CK("ulid_binary", ulid_binary) |
|
311
|
9 |
0 |
SEKHMET_REG_CK("ulid_monotonic", ulid_monotonic) |
|
312
|
9 |
0 |
SEKHMET_REG_CK("ulid_monotonic_binary", ulid_monotonic_binary) |
|
313
|
9 |
0 |
SEKHMET_REG_CK("ulid_time", ulid_time) |
|
314
|
9 |
0 |
SEKHMET_REG_CK("ulid_time_ms", ulid_time_ms) |
|
315
|
9 |
0 |
SEKHMET_REG_CK("ulid_to_uuid", ulid_to_uuid) |
|
316
|
9 |
0 |
SEKHMET_REG_CK("uuid_to_ulid", uuid_to_ulid) |
|
317
|
9 |
0 |
SEKHMET_REG_CK("ulid_compare", ulid_compare) |
|
318
|
9 |
0 |
SEKHMET_REG_CK("ulid_validate", ulid_validate) |
|
410
|
0 |
0 |
if (in_len == 16) { |
|
412
|
0 |
0 |
} else if (in_len == 26) { |
|
413
|
0 |
0 |
if (!sekhmet_ulid_decode(bin, in_str, 26)) |
|
433
|
0 |
0 |
if (in_len == 16) { |
|
435
|
0 |
0 |
} else if (in_len == 26) { |
|
436
|
0 |
0 |
if (!sekhmet_ulid_decode(bin, in_str, 26)) |
|
444
|
0 |
0 |
if (ms > (uint64_t)IV_MAX) |
|
463
|
0 |
0 |
if (in_len == 16) { |
|
465
|
0 |
0 |
} else if (in_len == 26) { |
|
466
|
0 |
0 |
if (!sekhmet_ulid_decode(bin, in_str, 26)) |
|
489
|
0 |
0 |
if (!sekhmet_uuid_to_ulid_bin(bin, in_str, (int)in_len)) |
|
511
|
0 |
0 |
if (a_len == 16) memcpy(a, a_str, 16); |
|
512
|
0 |
0 |
else if (a_len == 26) { |
|
513
|
0 |
0 |
if (!sekhmet_ulid_decode(a, a_str, 26)) |
|
517
|
0 |
0 |
if (b_len == 16) memcpy(b, b_str, 16); |
|
518
|
0 |
0 |
else if (b_len == 26) { |
|
519
|
0 |
0 |
if (!sekhmet_ulid_decode(b, b_str, 26)) |
|
524
|
0 |
0 |
RETVAL = (cmp < 0) ? -1 : (cmp > 0) ? 1 : 0; |
|
|
0 |
0 |
RETVAL = (cmp < 0) ? -1 : (cmp > 0) ? 1 : 0; |