/* * This file was generated automatically by ExtUtils::ParseXS version 2.21 from the * contents of Directive.xs. Do not edit this file, edit Directive.xs instead. * * ANY CHANGES MADE HERE WILL BE LOST! * */ #line 1 "Directive.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/Directive/Apache2__Directive.h" #line 38 "Directive.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 "Directive.c" XS(XS_Apache2__Directive_as_hash); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Directive_as_hash) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 1) croak_xs_usage(cv, "tree"); { Apache2__Directive tree; SV * RETVAL; if (sv_derived_from(ST(0), "Apache2::Directive")) { IV tmp = SvIV((SV*)SvRV(ST(0))); tree = INT2PTR(Apache2__Directive,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Directive::as_hash", "tree", "Apache2::Directive"); #line 36 "Directive.xs" RETVAL = mpxs_Apache2__Directive_as_hash(aTHX_ tree); #line 117 "Directive.c" ST(0) = RETVAL; sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Apache2__Directive_as_string); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Directive_as_string) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 1) croak_xs_usage(cv, "self"); { Apache2__Directive self; SV * RETVAL; if (sv_derived_from(ST(0), "Apache2::Directive")) { IV tmp = SvIV((SV*)SvRV(ST(0))); self = INT2PTR(Apache2__Directive,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Directive::as_string", "self", "Apache2::Directive"); #line 49 "Directive.xs" RETVAL = mpxs_Apache2__Directive_as_string(aTHX_ self); #line 150 "Directive.c" ST(0) = RETVAL; sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Apache2__Directive_conftree); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Directive_conftree) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 0) croak_xs_usage(cv, ""); { Apache2__Directive RETVAL; RETVAL = mpxs_Apache2__Directive_conftree(); ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Apache2::Directive", (void*)RETVAL); } XSRETURN(1); } XS(XS_Apache2__Directive_directive); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Directive_directive) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 1) croak_xs_usage(cv, "obj"); { Apache2__Directive obj; const char * RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Apache2::Directive")) { IV tmp = SvIV((SV*)SvRV(ST(0))); obj = INT2PTR(Apache2__Directive,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Directive::directive", "obj", "Apache2::Directive"); #line 69 "Directive.xs" RETVAL = (const char *) obj->directive; #line 205 "Directive.c" sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; } XSRETURN(1); } XS(XS_Apache2__Directive_args); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Directive_args) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 1) croak_xs_usage(cv, "obj"); { Apache2__Directive obj; const char * RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Apache2::Directive")) { IV tmp = SvIV((SV*)SvRV(ST(0))); obj = INT2PTR(Apache2__Directive,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Directive::args", "obj", "Apache2::Directive"); #line 83 "Directive.xs" RETVAL = (const char *) obj->args; #line 238 "Directive.c" sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; } XSRETURN(1); } XS(XS_Apache2__Directive_next); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Directive_next) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 1) croak_xs_usage(cv, "obj"); { Apache2__Directive obj; Apache2__Directive RETVAL; if (sv_derived_from(ST(0), "Apache2::Directive")) { IV tmp = SvIV((SV*)SvRV(ST(0))); obj = INT2PTR(Apache2__Directive,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Directive::next", "obj", "Apache2::Directive"); #line 97 "Directive.xs" RETVAL = (Apache2__Directive) obj->next; #line 270 "Directive.c" ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Apache2::Directive", (void*)RETVAL); } XSRETURN(1); } XS(XS_Apache2__Directive_first_child); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Directive_first_child) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 1) croak_xs_usage(cv, "obj"); { Apache2__Directive obj; Apache2__Directive RETVAL; if (sv_derived_from(ST(0), "Apache2::Directive")) { IV tmp = SvIV((SV*)SvRV(ST(0))); obj = INT2PTR(Apache2__Directive,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Directive::first_child", "obj", "Apache2::Directive"); #line 111 "Directive.xs" RETVAL = (Apache2__Directive) obj->first_child; #line 303 "Directive.c" ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Apache2::Directive", (void*)RETVAL); } XSRETURN(1); } XS(XS_Apache2__Directive_parent); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Directive_parent) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 1) croak_xs_usage(cv, "obj"); { Apache2__Directive obj; Apache2__Directive RETVAL; if (sv_derived_from(ST(0), "Apache2::Directive")) { IV tmp = SvIV((SV*)SvRV(ST(0))); obj = INT2PTR(Apache2__Directive,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Directive::parent", "obj", "Apache2::Directive"); #line 125 "Directive.xs" RETVAL = (Apache2__Directive) obj->parent; #line 336 "Directive.c" ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Apache2::Directive", (void*)RETVAL); } XSRETURN(1); } XS(XS_Apache2__Directive_filename); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Directive_filename) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 1) croak_xs_usage(cv, "obj"); { Apache2__Directive obj; const char * RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Apache2::Directive")) { IV tmp = SvIV((SV*)SvRV(ST(0))); obj = INT2PTR(Apache2__Directive,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Directive::filename", "obj", "Apache2::Directive"); #line 139 "Directive.xs" RETVAL = (const char *) obj->filename; #line 370 "Directive.c" sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; } XSRETURN(1); } XS(XS_Apache2__Directive_line_num); /* prototype to pass -Wmissing-prototypes */ XS(XS_Apache2__Directive_line_num) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 1) croak_xs_usage(cv, "obj"); { Apache2__Directive obj; int RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Apache2::Directive")) { IV tmp = SvIV((SV*)SvRV(ST(0))); obj = INT2PTR(Apache2__Directive,tmp); } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Apache2::Directive::line_num", "obj", "Apache2::Directive"); #line 153 "Directive.xs" RETVAL = (int) obj->line_num; #line 403 "Directive.c" XSprePUSH; PUSHi((IV)RETVAL); } XSRETURN(1); } #ifdef __cplusplus extern "C" #endif XS(boot_Apache2__Directive); /* prototype to pass -Wmissing-prototypes */ XS(boot_Apache2__Directive) { #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("Apache2::Directive::as_hash", XS_Apache2__Directive_as_hash, file); (void)newXS("Apache2::Directive::as_string", XS_Apache2__Directive_as_string, file); (void)newXS("Apache2::Directive::conftree", XS_Apache2__Directive_conftree, file); (void)newXS("Apache2::Directive::directive", XS_Apache2__Directive_directive, file); (void)newXS("Apache2::Directive::args", XS_Apache2__Directive_args, file); (void)newXS("Apache2::Directive::next", XS_Apache2__Directive_next, file); (void)newXS("Apache2::Directive::first_child", XS_Apache2__Directive_first_child, file); (void)newXS("Apache2::Directive::parent", XS_Apache2__Directive_parent, file); (void)newXS("Apache2::Directive::filename", XS_Apache2__Directive_filename, file); (void)newXS("Apache2::Directive::line_num", XS_Apache2__Directive_line_num, file); /* Initialisation Section */ #line 162 "Directive.xs" items = items; /* -Wall */ cv = newXS("Apache2::Directive::lookup", MPXS_Apache2__Directive_lookup, __FILE__); #line 448 "Directive.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; }