| 1 |
|
| MODULE = Punk PACKAGE = Punk::Headers |
| 2 |
|
| |
| 3 |
|
| PROTOTYPES: DISABLE |
| 4 |
|
| |
| 5 |
|
| # The one piece of the headers path that cannot be C: a nonblocking handler |
| 6 |
|
| # hands back a Future, and chaining onto it needs ->then. Punk::Headers::_chain |
| 7 |
|
| # does the chaining and calls this to do the work (punk_headers.h). The |
| 8 |
|
| # triplet and streaming shapes happen in pc_app_cb without a Perl frame. |
| 9 |
|
| void |
| 10 |
|
| _decorate(resp, pairs) |
| 11 |
|
| SV *resp |
| 12 |
|
| SV *pairs |
| 13 |
|
| CODE: |
| 14 |
|
| { |
| 15 |
1 |
| AV *headers = pco_headers_of(aTHX_ resp); |
| 16 |
1 |
▶ | if (headers && pairs && SvROK(pairs) |
Branch: 3 branches
| Branch | True | False | Total |
| if (headers && pairs && SvROK(pairs) |
1 |
0 |
1 |
| if (headers && pairs && SvROK(pairs) |
1 |
0 |
1 |
| if (headers && pairs && SvROK(pairs) |
1 |
0 |
1 |
|
| 17 |
1 |
▶ | && SvTYPE(SvRV(pairs)) == SVt_PVAV) |
Branch: 1 branch
| Branch | True | False | Total |
| && SvTYPE(SvRV(pairs)) == SVt_PVAV) |
1 |
0 |
1 |
|
| 18 |
1 |
| phd_add_absent(aTHX_ headers, (AV *)SvRV(pairs)); |
| 19 |
|
| } |