| line |
true |
false |
branch |
|
32
|
3 |
2 |
const char *p = SvOK(path) ? SvPV_nolen(path) : NULL; |
|
34
|
0 |
5 |
if (!h) croak("Data::Heap::Shared->new: %s", errbuf); |
|
48
|
0 |
1 |
if (!h) croak("Data::Heap::Shared->new_memfd: %s", errbuf); |
|
61
|
0 |
1 |
if (!h) croak("Data::Heap::Shared->new_from_fd: %s", errbuf); |
|
70
|
0 |
7 |
if (!SvROK(self)) return; |
|
72
|
0 |
7 |
if (!h) return; |
|
82
|
27 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
27 |
EXTRACT_HEAP(self); |
|
|
0 |
27 |
EXTRACT_HEAP(self); |
|
84
|
26 |
1 |
RETVAL = heap_push(h, (int64_t)priority, (int64_t)value); |
|
92
|
11 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
11 |
EXTRACT_HEAP(self); |
|
|
0 |
11 |
EXTRACT_HEAP(self); |
|
95
|
10 |
1 |
if (heap_pop(h, &p, &v)) { |
|
96
|
0 |
10 |
EXTEND(SP, 2); |
|
105
|
2 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
2 |
EXTRACT_HEAP(self); |
|
|
0 |
2 |
EXTRACT_HEAP(self); |
|
108
|
2 |
0 |
if (items > 1) timeout = SvNV(ST(1)); |
|
110
|
1 |
1 |
if (heap_pop_wait(h, &p, &v, timeout)) { |
|
111
|
0 |
1 |
EXTEND(SP, 2); |
|
120
|
1 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
1 |
EXTRACT_HEAP(self); |
|
|
0 |
1 |
EXTRACT_HEAP(self); |
|
123
|
1 |
0 |
if (heap_peek(h, &p, &v)) { |
|
124
|
0 |
1 |
EXTEND(SP, 2); |
|
133
|
5 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
5 |
EXTRACT_HEAP(self); |
|
|
0 |
5 |
EXTRACT_HEAP(self); |
|
135
|
0 |
5 |
RETVAL = heap_size(h); |
|
143
|
0 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
0 |
EXTRACT_HEAP(self); |
|
145
|
0 |
0 |
RETVAL = (UV)h->hdr->capacity; |
|
153
|
2 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
2 |
EXTRACT_HEAP(self); |
|
|
0 |
2 |
EXTRACT_HEAP(self); |
|
155
|
2 |
0 |
RETVAL = heap_size(h) == 0; |
|
163
|
1 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
1 |
EXTRACT_HEAP(self); |
|
|
0 |
1 |
EXTRACT_HEAP(self); |
|
165
|
1 |
0 |
RETVAL = heap_size(h) >= (UV)h->hdr->capacity; |
|
173
|
3 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
3 |
EXTRACT_HEAP(self); |
|
|
0 |
3 |
EXTRACT_HEAP(self); |
|
181
|
2 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
2 |
EXTRACT_HEAP(self); |
|
|
0 |
2 |
EXTRACT_HEAP(self); |
|
183
|
1 |
1 |
RETVAL = h->path ? newSVpv(h->path, 0) : &PL_sv_undef; |
|
191
|
1 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
1 |
EXTRACT_HEAP(self); |
|
|
0 |
1 |
EXTRACT_HEAP(self); |
|
193
|
0 |
1 |
RETVAL = h->backing_fd; |
|
201
|
1 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
1 |
EXTRACT_HEAP(self); |
|
|
0 |
1 |
EXTRACT_HEAP(self); |
|
203
|
0 |
1 |
RETVAL = heap_create_eventfd(h); |
|
212
|
0 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
0 |
EXTRACT_HEAP(self); |
|
214
|
0 |
0 |
if (h->notify_fd >= 0 && h->notify_fd != fd) close(h->notify_fd); |
|
|
0 |
0 |
if (h->notify_fd >= 0 && h->notify_fd != fd) close(h->notify_fd); |
|
221
|
1 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
1 |
EXTRACT_HEAP(self); |
|
|
0 |
1 |
EXTRACT_HEAP(self); |
|
223
|
0 |
1 |
RETVAL = h->notify_fd; |
|
231
|
1 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
1 |
EXTRACT_HEAP(self); |
|
|
0 |
1 |
EXTRACT_HEAP(self); |
|
233
|
1 |
0 |
RETVAL = heap_notify(h); |
|
241
|
1 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
1 |
EXTRACT_HEAP(self); |
|
|
0 |
1 |
EXTRACT_HEAP(self); |
|
244
|
1 |
0 |
RETVAL = (v >= 0) ? newSViv((IV)v) : &PL_sv_undef; |
|
252
|
1 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
1 |
EXTRACT_HEAP(self); |
|
|
0 |
1 |
EXTRACT_HEAP(self); |
|
261
|
1 |
0 |
if (sv_isobject(self_or_class)) { |
|
263
|
0 |
1 |
if (!h) croak("destroyed object"); |
|
266
|
0 |
0 |
if (items < 2) croak("Usage: ...->unlink($path)"); |
|
269
|
0 |
1 |
if (!p) croak("cannot unlink anonymous or memfd object"); |
|
270
|
0 |
1 |
if (unlink(p) != 0) croak("unlink(%s): %s", p, strerror(errno)); |
|
276
|
1 |
0 |
EXTRACT_HEAP(self); |
|
|
0 |
1 |
EXTRACT_HEAP(self); |
|
|
0 |
1 |
EXTRACT_HEAP(self); |