/* * This file was generated automatically by ExtUtils::ParseXS version 2.21 from the * contents of Filter.xs. Do not edit this file, edit Filter.xs instead. * * ANY CHANGES MADE HERE WILL BE LOST! * */ #line 1 "Filter.xs" /* * *********** WARNING ************** * This file generated by ModPerl::WrapXS/0.01 * Any changes made here will be lost * *********************************** * 01: lib/ModPerl/WrapXS.pm:540 * 02: lib/ModPerl/WrapXS.pm:1174 * 03: Makefile.PL:423 * 04: Makefile.PL:325 * 05: Makefile.PL:56 */ #define MP_IN_XS #include "mod_perl.h" #include "modperl_xs_sv_convert.h" #include "modperl_xs_util.h" #include "modperl_xs_typedefs.h" #include "Apache2/Filter/Apache2__Filter.h" #line 38 "Filter.c" #ifndef PERL_UNUSED_VAR # define PERL_UNUSED_VAR(var) if (0) var = var #endif #ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE #define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params) /* prototype to pass -Wmissing-prototypes */ STATIC void S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params); STATIC void S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params) { const GV *const gv = CvGV(cv); PERL_ARGS_ASSERT_CROAK_XS_USAGE; if (gv) { const char *const gvname = GvNAME(gv); const HV *const stash = GvSTASH(gv); const char *const hvname = stash ? HvNAME(stash) : NULL; if (hvname) Perl_croak(aTHX_ "Usage: %s::%s(%s)", hvname, gvname, params); else Perl_croak(aTHX_ "Usage: %s(%s)", gvname, params); } else { /* Pants. I don't think that it should be possible to get here. */ Perl_croak(aTHX_ "Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params); } } #undef PERL_ARGS_ASSERT_CROAK_XS_USAGE #ifdef PERL_IMPLICIT_CONTEXT #define croak_xs_usage(a,b) S_croak_xs_usage(aTHX_ a,b) #else #define croak_xs_usage S_croak_xs_usage #endif #endif /* NOTE: the prototype of newXSproto() is different in versions of perls, * so we define a portable version of newXSproto() */ #ifdef newXS_flags #define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0) #else #define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv) #endif /* !defined(newXS_flags) */ #line 90 "Filter.c" XS(XS_APR__Brigade_filter_flush); /* prototype to pass -Wmissing-prototypes */ XS(XS_APR__Brigade_filter_flush) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 2) croak_xs_usage(cv, "bb, ctx"); { APR__Brigade bb; void * ctx = INT2PTR(void *,SvIV(ST(1))); apr_status_t RETVAL; dXSTARG; if (sv_derived_from(ST(0), "APR::Brigade")) { IV tmp = SvIV((SV*)SvRV(ST(0))); bb = INT2PTR(APR__Brigade,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "APR::Brigade::filter_flush", "bb", "APR::Brigade"); RETVAL = ap_filter_flush(bb, ctx); XSprePUSH; PUSHi((IV)RETVAL); } XSRETURN(1); } XS(XS_Apache2__Connection_add_input_filter); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Connection_add_input_filter) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 2) croak_xs_usage(cv, "c, callback"); { Apache2__Connection c; SV * callback = ST(1); if (sv_derived_from(ST(0), "Apache2::Connection")) { IV tmp = SvIV((SV*)SvRV(ST(0))); c = INT2PTR(Apache2__Connection,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Connection::add_input_filter", "c", "Apache2::Connection"); #line 45 "Filter.xs" mpxs_Apache2__Connection_add_input_filter(aTHX_ c, callback); #line 148 "Filter.c" } XSRETURN_EMPTY; } XS(XS_Apache2__Connection_add_output_filter); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Connection_add_output_filter) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 2) croak_xs_usage(cv, "c, callback"); { Apache2__Connection c; SV * callback = ST(1); if (sv_derived_from(ST(0), "Apache2::Connection")) { IV tmp = SvIV((SV*)SvRV(ST(0))); c = INT2PTR(Apache2__Connection,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Connection::add_output_filter", "c", "Apache2::Connection"); #line 57 "Filter.xs" mpxs_Apache2__Connection_add_output_filter(aTHX_ c, callback); #line 178 "Filter.c" } XSRETURN_EMPTY; } XS(XS_Apache2__Filter_ctx); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Filter_ctx) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items < 1 || items > 2) croak_xs_usage(cv, "filter, data=Nullsv"); { Apache2__Filter filter; SV * data; SV * RETVAL; if (sv_derived_from(ST(0), "Apache2::Filter")) { IV tmp = SvIV((SV*)SvRV(ST(0))); filter = INT2PTR(Apache2__Filter,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Filter::ctx", "filter", "Apache2::Filter"); if (items < 2) data = Nullsv; else { data = ST(1); } #line 69 "Filter.xs" RETVAL = mpxs_Apache2__Filter_ctx(aTHX_ filter, data); #line 216 "Filter.c" ST(0) = RETVAL; sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Apache2__Filter_fflush); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Filter_fflush) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 2) croak_xs_usage(cv, "filter, brigade"); { Apache2__Filter filter; APR__Brigade brigade; apr_status_t RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Apache2::Filter")) { IV tmp = SvIV((SV*)SvRV(ST(0))); filter = INT2PTR(Apache2__Filter,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Filter::fflush", "filter", "Apache2::Filter"); if (sv_derived_from(ST(1), "APR::Brigade")) { IV tmp = SvIV((SV*)SvRV(ST(1))); brigade = INT2PTR(APR__Brigade,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Filter::fflush", "brigade", "APR::Brigade"); #line 83 "Filter.xs" RETVAL = mpxs_Apache2__Filter_fflush(aTHX_ filter, brigade); #line 260 "Filter.c" XSprePUSH; PUSHi((IV)RETVAL); } XSRETURN(1); } XS(XS_Apache2__Filter_get_brigade); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Filter_get_brigade) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items < 2 || items > 5) croak_xs_usage(cv, "f, bb, mode=AP_MODE_READBYTES, block=APR_BLOCK_READ, readbytes=8192"); { Apache2__Filter f; APR__Brigade bb; ap_input_mode_t mode; apr_read_type_e block; apr_off_t readbytes; apr_status_t RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Apache2::Filter")) { IV tmp = SvIV((SV*)SvRV(ST(0))); f = INT2PTR(Apache2__Filter,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Filter::get_brigade", "f", "Apache2::Filter"); if (sv_derived_from(ST(1), "APR::Brigade")) { IV tmp = SvIV((SV*)SvRV(ST(1))); bb = INT2PTR(APR__Brigade,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Filter::get_brigade", "bb", "APR::Brigade"); if (items < 3) mode = AP_MODE_READBYTES; else { mode = (ap_input_mode_t)SvIV(ST(2)); } if (items < 4) block = APR_BLOCK_READ; else { block = (apr_read_type_e)SvIV(ST(3)); } if (items < 5) readbytes = 8192; else { readbytes = (apr_off_t)SvIV(ST(4)); } #line 100 "Filter.xs" RETVAL = mpxs_Apache2__Filter_get_brigade(aTHX_ f, bb, mode, block, readbytes); #line 324 "Filter.c" XSprePUSH; PUSHi((IV)RETVAL); } XSRETURN(1); } XS(XS_Apache2__Filter_pass_brigade); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Filter_pass_brigade) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 2) croak_xs_usage(cv, "f, bb"); { Apache2__Filter f; APR__Brigade bb; apr_status_t RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Apache2::Filter")) { IV tmp = SvIV((SV*)SvRV(ST(0))); f = INT2PTR(Apache2__Filter,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Filter::pass_brigade", "f", "Apache2::Filter"); if (sv_derived_from(ST(1), "APR::Brigade")) { IV tmp = SvIV((SV*)SvRV(ST(1))); bb = INT2PTR(APR__Brigade,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Filter::pass_brigade", "bb", "APR::Brigade"); #line 114 "Filter.xs" RETVAL = mpxs_Apache2__Filter_pass_brigade(aTHX_ f, bb); #line 367 "Filter.c" XSprePUSH; PUSHi((IV)RETVAL); } XSRETURN(1); } XS(XS_Apache2__Filter_print); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Filter_print) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif PERL_UNUSED_VAR(cv); /* -W */ { apr_size_t RETVAL; dXSTARG; #line 126 "Filter.xs" RETVAL = mpxs_Apache2__Filter_print(aTHX_ items, MARK+1, SP); #line 389 "Filter.c" XSprePUSH; PUSHu((UV)RETVAL); } XSRETURN(1); } XS(XS_Apache2__Filter_read); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Filter_read) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif PERL_UNUSED_VAR(cv); /* -W */ { apr_size_t RETVAL; dXSTARG; #line 138 "Filter.xs" RETVAL = mpxs_Apache2__Filter_read(aTHX_ items, MARK+1, SP); #line 411 "Filter.c" XSprePUSH; PUSHu((UV)RETVAL); } XSRETURN(1); } XS(XS_Apache2__Filter_remove); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Filter_remove) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif PERL_UNUSED_VAR(cv); /* -W */ { #line 150 "Filter.xs" mpxs_Apache2__Filter_remove(aTHX_ items, MARK+1, SP); #line 430 "Filter.c" } XSRETURN_EMPTY; } XS(XS_Apache2__Filter_seen_eos); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Filter_seen_eos) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif PERL_UNUSED_VAR(cv); /* -W */ { SV * RETVAL; #line 160 "Filter.xs" RETVAL = mpxs_Apache2__Filter_seen_eos(aTHX_ items, MARK+1, SP); #line 450 "Filter.c" ST(0) = RETVAL; sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Apache2__RequestRec_add_input_filter); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__RequestRec_add_input_filter) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 2) croak_xs_usage(cv, "r, callback"); { Apache2__RequestRec r = modperl_xs_sv2request_rec(aTHX_ ST(0), "Apache2::RequestRec", cv); SV * callback = ST(1); #line 174 "Filter.xs" mpxs_Apache2__RequestRec_add_input_filter(aTHX_ r, callback); #line 473 "Filter.c" } XSRETURN_EMPTY; } XS(XS_Apache2__RequestRec_add_output_filter); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__RequestRec_add_output_filter) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 2) croak_xs_usage(cv, "r, callback"); { Apache2__RequestRec r = modperl_xs_sv2request_rec(aTHX_ ST(0), "Apache2::RequestRec", cv); SV * callback = ST(1); #line 186 "Filter.xs" mpxs_Apache2__RequestRec_add_output_filter(aTHX_ r, callback); #line 494 "Filter.c" } XSRETURN_EMPTY; } XS(XS_Apache2__Filter_TIEHANDLE); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Filter_TIEHANDLE) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items < 1 || items > 2) croak_xs_usage(cv, "stashsv, sv=Nullsv"); { SV * stashsv = ST(0); SV * sv; SV * RETVAL; if (items < 2) sv = Nullsv; else { sv = ST(1); } #line 198 "Filter.xs" RETVAL = mpxs_Apache2__Filter_TIEHANDLE(stashsv, sv); #line 523 "Filter.c" ST(0) = RETVAL; sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Apache2__Filter_PRINT); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Filter_PRINT) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif PERL_UNUSED_VAR(cv); /* -W */ { apr_size_t RETVAL; dXSTARG; #line 210 "Filter.xs" RETVAL = mpxs_Apache2__Filter_PRINT(aTHX_ items, MARK+1, SP); #line 546 "Filter.c" XSprePUSH; PUSHu((UV)RETVAL); } XSRETURN(1); } XS(XS_Apache2__Filter_frec); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Filter_frec) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 1) croak_xs_usage(cv, "obj"); { Apache2__Filter obj; Apache2__FilterRec RETVAL; if (sv_derived_from(ST(0), "Apache2::Filter")) { IV tmp = SvIV((SV*)SvRV(ST(0))); obj = INT2PTR(Apache2__Filter,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Filter::frec", "obj", "Apache2::Filter"); #line 224 "Filter.xs" RETVAL = (Apache2__FilterRec) obj->frec; #line 578 "Filter.c" ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Apache2::FilterRec", (void*)RETVAL); } XSRETURN(1); } XS(XS_Apache2__Filter_next); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Filter_next) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items < 1 || items > 2) croak_xs_usage(cv, "obj, val=NULL"); { Apache2__Filter obj; Apache2__Filter val; #line 237 "Filter.xs" /*nada*/ #line 603 "Filter.c" Apache2__Filter RETVAL; if (sv_derived_from(ST(0), "Apache2::Filter")) { IV tmp = SvIV((SV*)SvRV(ST(0))); obj = INT2PTR(Apache2__Filter,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Filter::next", "obj", "Apache2::Filter"); if (items < 2) val = NULL; else { if (sv_derived_from(ST(1), "Apache2::Filter")) { IV tmp = SvIV((SV*)SvRV(ST(1))); val = INT2PTR(Apache2__Filter,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Filter::next", "val", "Apache2::Filter"); } #line 241 "Filter.xs" RETVAL = (Apache2__Filter) obj->next; if (items > 1) { obj->next = (Apache2__Filter) val; } #line 635 "Filter.c" ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Apache2::Filter", (void*)RETVAL); } XSRETURN(1); } XS(XS_Apache2__Filter_r); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Filter_r) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items < 1 || items > 2) croak_xs_usage(cv, "obj, val=NULL"); { Apache2__Filter obj; Apache2__RequestRec val; #line 259 "Filter.xs" /*nada*/ #line 660 "Filter.c" Apache2__RequestRec RETVAL; if (sv_derived_from(ST(0), "Apache2::Filter")) { IV tmp = SvIV((SV*)SvRV(ST(0))); obj = INT2PTR(Apache2__Filter,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Filter::r", "obj", "Apache2::Filter"); if (items < 2) val = NULL; else { val = modperl_xs_sv2request_rec(aTHX_ ST(1), "Apache2::RequestRec", cv); } #line 263 "Filter.xs" RETVAL = (Apache2__RequestRec) obj->r; if (items > 1) { obj->r = (Apache2__RequestRec) val; } #line 685 "Filter.c" ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Apache2::RequestRec", (void*)RETVAL); } XSRETURN(1); } XS(XS_Apache2__Filter_c); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Filter_c) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items < 1 || items > 2) croak_xs_usage(cv, "obj, val=NULL"); { Apache2__Filter obj; Apache2__Connection val; #line 281 "Filter.xs" /*nada*/ #line 711 "Filter.c" Apache2__Connection RETVAL; if (sv_derived_from(ST(0), "Apache2::Filter")) { IV tmp = SvIV((SV*)SvRV(ST(0))); obj = INT2PTR(Apache2__Filter,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Filter::c", "obj", "Apache2::Filter"); if (items < 2) val = NULL; else { if (sv_derived_from(ST(1), "Apache2::Connection")) { IV tmp = SvIV((SV*)SvRV(ST(1))); val = INT2PTR(Apache2__Connection,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Filter::c", "val", "Apache2::Connection"); } #line 285 "Filter.xs" RETVAL = (Apache2__Connection) obj->c; if (items > 1) { obj->c = (Apache2__Connection) val; } #line 743 "Filter.c" ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Apache2::Connection", (void*)RETVAL); } XSRETURN(1); } #ifdef __cplusplus extern "C" #endif XS(boot_Apache2__Filter); /* prototype to pass -Wmissing-prototypes */ XS(boot_Apache2__Filter) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif #if (PERL_REVISION == 5 && PERL_VERSION < 9) char* file = __FILE__; #else const char* file = __FILE__; #endif PERL_UNUSED_VAR(cv); /* -W */ PERL_UNUSED_VAR(items); /* -W */ XS_VERSION_BOOTCHECK ; (void)newXS("APR::Brigade::filter_flush", XS_APR__Brigade_filter_flush, file); (void)newXS("Apache2::Connection::add_input_filter", XS_Apache2__Connection_add_input_filter, file); (void)newXS("Apache2::Connection::add_output_filter", XS_Apache2__Connection_add_output_filter, file); (void)newXS("Apache2::Filter::ctx", XS_Apache2__Filter_ctx, file); (void)newXS("Apache2::Filter::fflush", XS_Apache2__Filter_fflush, file); (void)newXS("Apache2::Filter::get_brigade", XS_Apache2__Filter_get_brigade, file); (void)newXS("Apache2::Filter::pass_brigade", XS_Apache2__Filter_pass_brigade, file); (void)newXS("Apache2::Filter::print", XS_Apache2__Filter_print, file); (void)newXS("Apache2::Filter::read", XS_Apache2__Filter_read, file); (void)newXS("Apache2::Filter::remove", XS_Apache2__Filter_remove, file); (void)newXS("Apache2::Filter::seen_eos", XS_Apache2__Filter_seen_eos, file); (void)newXS("Apache2::RequestRec::add_input_filter", XS_Apache2__RequestRec_add_input_filter, file); (void)newXS("Apache2::RequestRec::add_output_filter", XS_Apache2__RequestRec_add_output_filter, file); (void)newXS("Apache2::Filter::TIEHANDLE", XS_Apache2__Filter_TIEHANDLE, file); (void)newXS("Apache2::Filter::PRINT", XS_Apache2__Filter_PRINT, file); (void)newXS("Apache2::Filter::frec", XS_Apache2__Filter_frec, file); (void)newXS("Apache2::Filter::next", XS_Apache2__Filter_next, file); (void)newXS("Apache2::Filter::r", XS_Apache2__Filter_r, file); (void)newXS("Apache2::Filter::c", XS_Apache2__Filter_c, file); /* Initialisation Section */ #line 299 "Filter.xs" items = items; /* -Wall */ cv = newXS("Apache2::Filter::MODIFY_CODE_ATTRIBUTES", MPXS_modperl_filter_attributes, __FILE__); #line 798 "Filter.c" /* End of Initialisation Section */ #if (PERL_REVISION == 5 && PERL_VERSION >= 9) if (PL_unitcheckav) call_list(PL_scopestack_ix, PL_unitcheckav); #endif XSRETURN_YES; }