| line |
true |
false |
branch |
|
74
|
0 |
4 |
PP_CONST_IV(fmt_str, HORUS_FMT_STR) |
|
75
|
0 |
8 |
PP_CONST_IV(fmt_hex, HORUS_FMT_HEX) |
|
76
|
0 |
4 |
PP_CONST_IV(fmt_braces, HORUS_FMT_BRACES) |
|
77
|
0 |
4 |
PP_CONST_IV(fmt_urn, HORUS_FMT_URN) |
|
78
|
0 |
4 |
PP_CONST_IV(fmt_base64, HORUS_FMT_BASE64) |
|
79
|
0 |
1 |
PP_CONST_IV(fmt_base32, HORUS_FMT_BASE32) |
|
80
|
0 |
1 |
PP_CONST_IV(fmt_crockford, HORUS_FMT_CROCKFORD) |
|
81
|
0 |
5 |
PP_CONST_IV(fmt_binary, HORUS_FMT_BINARY) |
|
82
|
0 |
5 |
PP_CONST_IV(fmt_upper_str, HORUS_FMT_UPPER_STR) |
|
83
|
0 |
3 |
PP_CONST_IV(fmt_upper_hex, HORUS_FMT_UPPER_HEX) |
|
94
|
0 |
8 |
PP_CONST_PV(ns_dns, "6ba7b810-9dad-11d1-80b4-00c04fd430c8", 36) |
|
95
|
0 |
2 |
PP_CONST_PV(ns_url, "6ba7b811-9dad-11d1-80b4-00c04fd430c8", 36) |
|
96
|
0 |
0 |
PP_CONST_PV(ns_oid, "6ba7b812-9dad-11d1-80b4-00c04fd430c8", 36) |
|
97
|
0 |
0 |
PP_CONST_PV(ns_x500, "6ba7b814-9dad-11d1-80b4-00c04fd430c8", 36) |
|
110
|
13 |
1005 |
if (items > 0) fmt = SvIV(PL_stack_base[ax]); |
|
115
|
0 |
1018 |
XPUSHs(sv_2mortal(horus_uuid_to_sv(aTHX_ uuid, fmt))); |
|
131
|
8 |
105 |
if (items > 0) fmt = SvIV(PL_stack_base[ax]); |
|
136
|
0 |
113 |
XPUSHs(sv_2mortal(horus_uuid_to_sv(aTHX_ uuid, fmt))); |
|
152
|
0 |
122 |
if (items > 0) fmt = SvIV(PL_stack_base[ax]); |
|
157
|
0 |
122 |
XPUSHs(sv_2mortal(horus_uuid_to_sv(aTHX_ uuid, fmt))); |
|
173
|
8 |
2104 |
if (items > 0) fmt = SvIV(PL_stack_base[ax]); |
|
178
|
0 |
2112 |
XPUSHs(sv_2mortal(horus_uuid_to_sv(aTHX_ uuid, fmt))); |
|
193
|
12 |
3 |
if (items > 0) fmt = SvIV(PL_stack_base[ax]); |
|
198
|
0 |
15 |
XPUSHs(sv_2mortal(horus_uuid_to_sv(aTHX_ uuid, fmt))); |
|
213
|
11 |
3 |
if (items > 0) fmt = SvIV(PL_stack_base[ax]); |
|
218
|
0 |
14 |
XPUSHs(sv_2mortal(horus_uuid_to_sv(aTHX_ uuid, fmt))); |
|
238
|
0 |
2 |
if (items < 1) croak("uuid_v2 requires at least a domain argument"); |
|
242
|
0 |
2 |
if (items >= 2 && SvOK(PL_stack_base[ax + 1])) { |
|
|
0 |
0 |
if (items >= 2 && SvOK(PL_stack_base[ax + 1])) { |
|
245
|
1 |
1 |
if (domain == 0) local_id = (uint32_t)getuid(); |
|
246
|
1 |
0 |
else if (domain == 1) local_id = (uint32_t)getgid(); |
|
250
|
0 |
2 |
if (items >= 3) fmt = SvIV(PL_stack_base[ax + 2]); |
|
255
|
0 |
2 |
XPUSHs(sv_2mortal(horus_uuid_to_sv(aTHX_ uuid, fmt))); |
|
272
|
0 |
5 |
if (items < 2) croak("uuid_v3 requires namespace and name arguments"); |
|
273
|
0 |
5 |
if (items > 2) fmt = SvIV(PL_stack_base[ax + 2]); |
|
275
|
0 |
5 |
if (!horus_parse_ns(aTHX_ PL_stack_base[ax], ns_bytes)) |
|
282
|
0 |
5 |
XPUSHs(sv_2mortal(horus_uuid_to_sv(aTHX_ uuid, fmt))); |
|
299
|
0 |
5 |
if (items < 2) croak("uuid_v5 requires namespace and name arguments"); |
|
300
|
0 |
5 |
if (items > 2) fmt = SvIV(PL_stack_base[ax + 2]); |
|
302
|
0 |
5 |
if (!horus_parse_ns(aTHX_ PL_stack_base[ax], ns_bytes)) |
|
309
|
0 |
5 |
XPUSHs(sv_2mortal(horus_uuid_to_sv(aTHX_ uuid, fmt))); |
|
326
|
0 |
1 |
if (items < 1) croak("uuid_v8 requires custom data argument"); |
|
327
|
0 |
1 |
if (items > 1) fmt = SvIV(PL_stack_base[ax + 1]); |
|
330
|
0 |
1 |
if (data_len < 16) croak("Horus: uuid_v8 requires 16 bytes of custom data"); |
|
335
|
0 |
1 |
XPUSHs(sv_2mortal(horus_uuid_to_sv(aTHX_ uuid, fmt))); |
|
352
|
0 |
3 |
if (items < 1) croak("uuid_v4_bulk requires count argument"); |
|
355
|
1 |
2 |
if (items > 1) fmt = SvIV(PL_stack_base[ax + 1]); |
|
359
|
0 |
3 |
if (count <= 0) { |
|
364
|
3 |
0 |
EXTEND(SP, count); |
|
|
0 |
3 |
EXTEND(SP, count); |
|
366
|
1 |
2 |
if (count <= 256) { |
|
367
|
10 |
1 |
for (i = 0; i < count; i++) { |
|
376
|
1500 |
2 |
for (i = 0; i < count; i++) { |
|
401
|
0 |
50 |
if (items < 1) croak("uuid_parse requires 1 argument"); |
|
404
|
1 |
49 |
if (horus_parse_uuid(uuid, in_str, in_len) != HORUS_PARSE_OK) |
|
408
|
0 |
49 |
XPUSHs(sv_2mortal(newSVpvn((const char *)uuid, 16))); |
|
423
|
0 |
17 |
if (items < 1) croak("uuid_validate requires 1 argument"); |
|
428
|
0 |
17 |
XPUSHs(sv_2mortal(newSViv(horus_uuid_validate(in_str, in_len)))); |
|
444
|
0 |
15 |
if (items < 1) croak("uuid_version requires 1 argument"); |
|
447
|
0 |
15 |
if (horus_parse_uuid(uuid, in_str, in_len) != HORUS_PARSE_OK) |
|
451
|
0 |
15 |
XPUSHs(sv_2mortal(newSViv(horus_uuid_version_bin(uuid)))); |
|
467
|
0 |
8 |
if (items < 1) croak("uuid_variant requires 1 argument"); |
|
470
|
0 |
8 |
if (horus_parse_uuid(uuid, in_str, in_len) != HORUS_PARSE_OK) |
|
474
|
0 |
8 |
XPUSHs(sv_2mortal(newSViv(horus_uuid_variant_bin(uuid)))); |
|
491
|
0 |
5 |
if (items < 2) croak("uuid_cmp requires 2 arguments"); |
|
496
|
0 |
5 |
if (horus_parse_uuid(a, a_str, a_len) != HORUS_PARSE_OK) |
|
498
|
0 |
5 |
if (horus_parse_uuid(b, b_str, b_len) != HORUS_PARSE_OK) |
|
504
|
0 |
5 |
XPUSHs(sv_2mortal(newSViv((cmp < 0) ? -1 : (cmp > 0) ? 1 : 0))); |
|
|
3 |
2 |
XPUSHs(sv_2mortal(newSViv((cmp < 0) ? -1 : (cmp > 0) ? 1 : 0))); |
|
521
|
0 |
57 |
if (items < 2) croak("uuid_convert requires input and format arguments"); |
|
526
|
0 |
57 |
if (horus_parse_uuid(uuid, in_str, in_len) != HORUS_PARSE_OK) |
|
530
|
0 |
57 |
XPUSHs(sv_2mortal(horus_uuid_to_sv(aTHX_ uuid, fmt))); |
|
546
|
0 |
6 |
if (items < 1) croak("uuid_time requires 1 argument"); |
|
549
|
0 |
6 |
if (horus_parse_uuid(uuid, in_str, in_len) != HORUS_PARSE_OK) |
|
553
|
0 |
6 |
XPUSHs(sv_2mortal(newSVnv(horus_uuid_extract_time(uuid)))); |
|
570
|
0 |
4 |
if (items < 1) croak("uuid_is_nil requires 1 argument"); |
|
573
|
4 |
0 |
if (horus_parse_uuid(uuid, in_str, in_len) == HORUS_PARSE_OK) |
|
577
|
0 |
4 |
XPUSHs(sv_2mortal(newSViv(result))); |
|
594
|
0 |
4 |
if (items < 1) croak("uuid_is_max requires 1 argument"); |
|
597
|
4 |
0 |
if (horus_parse_uuid(uuid, in_str, in_len) == HORUS_PARSE_OK) |
|
601
|
0 |
4 |
XPUSHs(sv_2mortal(newSViv(result))); |
|
661
|
19 |
0 |
HORUS_REG_CK("UUID_FMT_STR", fmt_str) |
|
662
|
19 |
0 |
HORUS_REG_CK("UUID_FMT_HEX", fmt_hex) |
|
663
|
19 |
0 |
HORUS_REG_CK("UUID_FMT_BRACES", fmt_braces) |
|
664
|
19 |
0 |
HORUS_REG_CK("UUID_FMT_URN", fmt_urn) |
|
665
|
19 |
0 |
HORUS_REG_CK("UUID_FMT_BASE64", fmt_base64) |
|
666
|
19 |
0 |
HORUS_REG_CK("UUID_FMT_BASE32", fmt_base32) |
|
667
|
19 |
0 |
HORUS_REG_CK("UUID_FMT_CROCKFORD", fmt_crockford) |
|
668
|
19 |
0 |
HORUS_REG_CK("UUID_FMT_BINARY", fmt_binary) |
|
669
|
19 |
0 |
HORUS_REG_CK("UUID_FMT_UPPER_STR", fmt_upper_str) |
|
670
|
19 |
0 |
HORUS_REG_CK("UUID_FMT_UPPER_HEX", fmt_upper_hex) |
|
672
|
19 |
0 |
HORUS_REG_CK("UUID_NS_DNS", ns_dns) |
|
673
|
19 |
0 |
HORUS_REG_CK("UUID_NS_URL", ns_url) |
|
674
|
19 |
0 |
HORUS_REG_CK("UUID_NS_OID", ns_oid) |
|
675
|
19 |
0 |
HORUS_REG_CK("UUID_NS_X500", ns_x500) |
|
677
|
19 |
0 |
HORUS_REG_CK("uuid_v1", uuid_v1) |
|
678
|
19 |
0 |
HORUS_REG_CK("uuid_v2", uuid_v2) |
|
679
|
19 |
0 |
HORUS_REG_CK("uuid_v3", uuid_v3) |
|
680
|
19 |
0 |
HORUS_REG_CK("uuid_v4", uuid_v4) |
|
681
|
19 |
0 |
HORUS_REG_CK("uuid_v5", uuid_v5) |
|
682
|
19 |
0 |
HORUS_REG_CK("uuid_v6", uuid_v6) |
|
683
|
19 |
0 |
HORUS_REG_CK("uuid_v7", uuid_v7) |
|
684
|
19 |
0 |
HORUS_REG_CK("uuid_v8", uuid_v8) |
|
685
|
19 |
0 |
HORUS_REG_CK("uuid_nil", uuid_nil) |
|
686
|
19 |
0 |
HORUS_REG_CK("uuid_max", uuid_max) |
|
688
|
19 |
0 |
HORUS_REG_CK("uuid_v4_bulk", uuid_v4_bulk) |
|
690
|
19 |
0 |
HORUS_REG_CK("uuid_parse", uuid_parse) |
|
691
|
19 |
0 |
HORUS_REG_CK("uuid_validate", uuid_validate) |
|
692
|
19 |
0 |
HORUS_REG_CK("uuid_version", uuid_version) |
|
693
|
19 |
0 |
HORUS_REG_CK("uuid_variant", uuid_variant) |
|
694
|
19 |
0 |
HORUS_REG_CK("uuid_cmp", uuid_cmp) |
|
695
|
19 |
0 |
HORUS_REG_CK("uuid_convert", uuid_convert) |
|
696
|
19 |
0 |
HORUS_REG_CK("uuid_time", uuid_time) |
|
697
|
19 |
0 |
HORUS_REG_CK("uuid_is_nil", uuid_is_nil) |
|
698
|
19 |
0 |
HORUS_REG_CK("uuid_is_max", uuid_is_max) |
|
736
|
0 |
0 |
RETVAL = HORUS_FMT_STR; |
|
743
|
0 |
0 |
RETVAL = HORUS_FMT_HEX; |
|
750
|
0 |
0 |
RETVAL = HORUS_FMT_BRACES; |
|
757
|
0 |
0 |
RETVAL = HORUS_FMT_URN; |
|
764
|
0 |
0 |
RETVAL = HORUS_FMT_BASE64; |
|
771
|
0 |
0 |
RETVAL = HORUS_FMT_BASE32; |
|
778
|
0 |
0 |
RETVAL = HORUS_FMT_CROCKFORD; |
|
785
|
0 |
0 |
RETVAL = HORUS_FMT_BINARY; |
|
792
|
0 |
0 |
RETVAL = HORUS_FMT_UPPER_STR; |
|
799
|
0 |
0 |
RETVAL = HORUS_FMT_UPPER_HEX; |
|
856
|
0 |
0 |
if (items < 2 || !SvOK(ST(1))) { |
|
|
0 |
0 |
if (items < 2 || !SvOK(ST(1))) { |
|
857
|
0 |
0 |
if (domain == 0) |
|
859
|
0 |
0 |
else if (domain == 1) |
|
884
|
0 |
0 |
if (!horus_parse_ns(aTHX_ ns_uuid, ns_bytes)) |
|
918
|
0 |
0 |
if (!horus_parse_ns(aTHX_ ns_uuid, ns_bytes)) |
|
964
|
0 |
0 |
if (data_len < 16) |
|
1004
|
0 |
0 |
if (count <= 0) |
|
1007
|
0 |
0 |
if (count <= 256) { |
|
1008
|
0 |
0 |
for (i = 0; i < count; i++) { |
|
1011
|
0 |
0 |
mXPUSHs(horus_uuid_to_sv(aTHX_ uuid, fmt)); |
|
1018
|
0 |
0 |
for (i = 0; i < count; i++) { |
|
1021
|
0 |
0 |
mXPUSHs(horus_uuid_to_sv(aTHX_ uuid, fmt)); |
|
1038
|
0 |
0 |
if (horus_parse_uuid(uuid, in_str, in_len) != HORUS_PARSE_OK) |
|
1067
|
0 |
0 |
if (horus_parse_uuid(uuid, in_str, in_len) != HORUS_PARSE_OK) |
|
1084
|
0 |
0 |
if (horus_parse_uuid(uuid, in_str, in_len) != HORUS_PARSE_OK) |
|
1104
|
0 |
0 |
if (horus_parse_uuid(a, a_str, a_len) != HORUS_PARSE_OK) |
|
1106
|
0 |
0 |
if (horus_parse_uuid(b, b_str, b_len) != HORUS_PARSE_OK) |
|
1110
|
0 |
0 |
RETVAL = (cmp < 0) ? -1 : (cmp > 0) ? 1 : 0; |
|
|
0 |
0 |
RETVAL = (cmp < 0) ? -1 : (cmp > 0) ? 1 : 0; |
|
1125
|
0 |
0 |
if (horus_parse_uuid(uuid, in_str, in_len) != HORUS_PARSE_OK) |
|
1142
|
0 |
0 |
if (horus_parse_uuid(uuid, in_str, in_len) != HORUS_PARSE_OK) |
|
1159
|
0 |
0 |
if (horus_parse_uuid(uuid, in_str, in_len) != HORUS_PARSE_OK) |
|
1176
|
0 |
0 |
if (horus_parse_uuid(uuid, in_str, in_len) != HORUS_PARSE_OK) |
|
1195
|
2 |
2 |
for (i = 1; i + 1 < items; i += 2) { |
|
1200
|
1 |
1 |
if (klen == 6 && memcmp(key, "format", 6) == 0) |
|
|
1 |
0 |
if (klen == 6 && memcmp(key, "format", 6) == 0) |
|
1202
|
1 |
0 |
else if (klen == 7 && memcmp(key, "version", 7) == 0) |
|
|
1 |
0 |
else if (klen == 7 && memcmp(key, "version", 7) == 0) |
|
1225
|
2 |
0 |
if (!SvROK(self) || SvTYPE(SvRV(self)) != SVt_PVHV) |
|
|
0 |
2 |
if (!SvROK(self) || SvTYPE(SvRV(self)) != SVt_PVHV) |
|
1230
|
2 |
0 |
fmt = svp ? SvIV(*svp) : HORUS_FMT_STR; |
|
1233
|
2 |
0 |
ver = svp ? SvIV(*svp) : 4; |
|
1260
|
2 |
0 |
if (!SvROK(self) || SvTYPE(SvRV(self)) != SVt_PVHV) |
|
|
0 |
2 |
if (!SvROK(self) || SvTYPE(SvRV(self)) != SVt_PVHV) |
|
1265
|
2 |
0 |
fmt = svp ? SvIV(*svp) : HORUS_FMT_STR; |
|
1268
|
2 |
0 |
ver = svp ? SvIV(*svp) : 4; |
|
1270
|
0 |
2 |
if (count <= 0) |
|
1273
|
2 |
0 |
EXTEND(SP, count); |
|
|
0 |
2 |
EXTEND(SP, count); |
|
1275
|
1 |
1 |
if (ver == 4 && count > 256) { |
|
|
0 |
1 |
if (ver == 4 && count > 256) { |
|
1279
|
0 |
0 |
for (i = 0; i < count; i++) { |
|
1282
|
0 |
0 |
mXPUSHs(horus_uuid_to_sv(aTHX_ uuid, fmt)); |
|
1286
|
150 |
2 |
for (i = 0; i < count; i++) { |
|
1296
|
0 |
150 |
mXPUSHs(horus_uuid_to_sv(aTHX_ uuid, fmt)); |