HTTP-Headers-Fast-XS

 view release on metacpan or  search on metacpan

XS.xs  view on Meta::CPAN

            __push_header(aTHX_ (HV *) SvRV(self), field, len, val);
       }


void
_header_get( SV *self, SV *field_name, ... )
    PREINIT:
        char   *field;
        STRLEN len;
        bool   skip_standardize;
    PPCODE:
        field = SvPV(field_name, len);
        skip_standardize = ( items == 3 ) && SvTRUE(ST(3));
        if (!skip_standardize)
            handle_standard_case(aTHX_ field, len);

        /* we are putting the decremented(with the number of input parameters) SP back in the THX */
        PUTBACK;

        put_header_value_on_perl_stack(aTHX_ self, field, len);

XS.xs  view on Meta::CPAN

        SPAGAIN;


void
_header_set(SV *self, SV *field_name, SV *val)
    PREINIT:
        char   *field;
        STRLEN len;
        bool   found;
        SV     **a_value;
    PPCODE:
        field = SvPV(field_name, len);

        handle_standard_case(aTHX_ field, len);

        /* we are putting the decremented(with the number of input parameters) SP back in the THX */
        PUTBACK;

        found = put_header_value_on_perl_stack(aTHX_ self, field, len);

        /* we are setting the local SP variable to the value in THX */

XS.xs  view on Meta::CPAN

                val = *a_value;
            }
            hv_store( (HV *) SvRV(self), field, len, newSVsv(val), 0);
        }

void
_header_push(SV *self, SV *field_name, SV *val)
    PREINIT:
        char   *field;
        STRLEN len;
    PPCODE:
        field = SvPV(field_name, len);

        handle_standard_case(aTHX_ field, len);

        /* we are putting the decremented (with the number of
        input parameters) SP back in the THX */
        PUTBACK;

        put_header_value_on_perl_stack(aTHX_ self, field, len);



( run in 2.133 seconds using v1.01-cache-2.11-cpan-5511b514fd6 )