| line |
true |
false |
branch |
|
33
|
7 |
11 |
const char *p = SvOK(path) ? SvPV_nolen(path) : NULL; |
|
34
|
0 |
18 |
if (max_strings > SI_MAX_STRINGS) croak("Data::Intern::Shared->new: max_strings exceeds 2^30"); |
|
35
|
0 |
18 |
if (arena_bytes > UINT32_MAX) croak("Data::Intern::Shared->new: arena_bytes exceeds 2^32"); |
|
37
|
2 |
16 |
if (!h) croak("Data::Intern::Shared->new: %s", errbuf); |
|
51
|
1 |
1 |
const char *nm = SvOK(name) ? SvPV_nolen(name) : NULL; /* undef -> default label */ |
|
52
|
0 |
2 |
if (max_strings > SI_MAX_STRINGS) croak("Data::Intern::Shared->new_memfd: max_strings exceeds 2^30"); |
|
53
|
0 |
2 |
if (arena_bytes > UINT32_MAX) croak("Data::Intern::Shared->new_memfd: arena_bytes exceeds 2^32"); |
|
55
|
0 |
2 |
if (!h) croak("Data::Intern::Shared->new_memfd: %s", errbuf); |
|
68
|
0 |
1 |
if (!h) croak("Data::Intern::Shared->new_from_fd: %s", errbuf); |
|
77
|
20 |
0 |
if (sv_isobject(self) && sv_derived_from(self, "Data::Intern::Shared")) { |
|
|
20 |
0 |
if (sv_isobject(self) && sv_derived_from(self, "Data::Intern::Shared")) { |
|
79
|
19 |
1 |
if (h) { sv_setiv(SvRV(self), 0); si_destroy(h); } /* null first: activates EXTRACT's use-after-destroy croak + makes a double DESTROY a no-op */ |
|
86
|
16 |
0 |
EXTRACT(self); |
|
|
0 |
16 |
EXTRACT(self); |
|
|
1 |
15 |
EXTRACT(self); |
|
98
|
3 |
0 |
EXTRACT(self); |
|
|
0 |
3 |
EXTRACT(self); |
|
|
0 |
3 |
EXTRACT(self); |
|
100
|
0 |
3 |
RETVAL = h->hdr->max_strings; |
|
108
|
3 |
0 |
EXTRACT(self); |
|
|
0 |
3 |
EXTRACT(self); |
|
|
0 |
3 |
EXTRACT(self); |
|
110
|
0 |
3 |
RETVAL = h->hdr->arena_bytes; |
|
118
|
3 |
0 |
EXTRACT(self); |
|
|
0 |
3 |
EXTRACT(self); |
|
|
0 |
3 |
EXTRACT(self); |
|
130
|
2 |
0 |
EXTRACT(self); |
|
|
0 |
2 |
EXTRACT(self); |
|
|
0 |
2 |
EXTRACT(self); |
|
141
|
41539 |
0 |
EXTRACT(self); |
|
|
0 |
41539 |
EXTRACT(self); |
|
|
0 |
41539 |
EXTRACT(self); |
|
151
|
41535 |
4 |
RETVAL = (id < 0) ? &PL_sv_undef : newSVuv((UV)id); |
|
160
|
37013 |
0 |
EXTRACT(self); |
|
|
0 |
37013 |
EXTRACT(self); |
|
|
0 |
37013 |
EXTRACT(self); |
|
169
|
37011 |
2 |
RETVAL = found ? newSVuv(id) : &PL_sv_undef; |
|
178
|
37017 |
0 |
EXTRACT(self); |
|
|
0 |
37017 |
EXTRACT(self); |
|
|
0 |
37017 |
EXTRACT(self); |
|
183
|
37015 |
2 |
if (id < h->hdr->count) { |
|
199
|
35611 |
0 |
EXTRACT(self); |
|
|
0 |
35611 |
EXTRACT(self); |
|
|
0 |
35611 |
EXTRACT(self); |
|
215
|
1 |
0 |
EXTRACT(self); |
|
|
0 |
1 |
EXTRACT(self); |
|
|
0 |
1 |
EXTRACT(self); |
|
240
|
4 |
0 |
EXTRACT(self); |
|
|
0 |
4 |
EXTRACT(self); |
|
|
0 |
4 |
EXTRACT(self); |
|
242
|
1 |
3 |
RETVAL = h->path ? newSVpv(h->path, 0) : &PL_sv_undef; |
|
250
|
4 |
0 |
EXTRACT(self); |
|
|
0 |
4 |
EXTRACT(self); |
|
|
0 |
4 |
EXTRACT(self); |
|
252
|
0 |
4 |
RETVAL = h->backing_fd; |
|
260
|
4 |
0 |
EXTRACT(self); |
|
|
0 |
4 |
EXTRACT(self); |
|
|
0 |
4 |
EXTRACT(self); |
|
262
|
0 |
4 |
if (si_msync(h) != 0) croak("sync: %s", strerror(errno)); |
|
268
|
1 |
1 |
if (sv_isobject(self) && sv_derived_from(self, "Data::Intern::Shared")) { |
|
|
1 |
0 |
if (sv_isobject(self) && sv_derived_from(self, "Data::Intern::Shared")) { |
|
270
|
1 |
0 |
if (h && h->path) unlink(h->path); |
|
|
1 |
0 |
if (h && h->path) unlink(h->path); |
|
271
|
1 |
0 |
} else if (items >= 2 && SvOK(ST(1))) { |
|
|
1 |
0 |
} else if (items >= 2 && SvOK(ST(1))) { |