/* * This file was generated automatically by ExtUtils::ParseXS version 2.21 from the * contents of UUID.xs. Do not edit this file, edit UUID.xs instead. * * ANY CHANGES MADE HERE WILL BE LOST! * */ #line 1 "UUID.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 "APR/UUID/APR__UUID.h" #line 38 "UUID.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 "UUID.c" XS(XS_APR__UUID_new); /* prototype to pass -Wmissing-prototypes */ XS(XS_APR__UUID_new) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 1) croak_xs_usage(cv, "CLASS"); { SV * CLASS = ST(0); APR__UUID RETVAL; #line 36 "UUID.xs" RETVAL = mpxs_apr_uuid_get(aTHX_ CLASS); #line 108 "UUID.c" ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "APR::UUID", (void*)RETVAL); } XSRETURN(1); } XS(XS_APR__UUID_parse); /* prototype to pass -Wmissing-prototypes */ XS(XS_APR__UUID_parse) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 2) croak_xs_usage(cv, "CLASS, buf"); { SV * CLASS = ST(0); char * buf = (char *)SvPV_nolen(ST(1)); APR__UUID RETVAL; #line 50 "UUID.xs" RETVAL = mpxs_apr_uuid_parse(aTHX_ CLASS, buf); #line 133 "UUID.c" ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "APR::UUID", (void*)RETVAL); } XSRETURN(1); } XS(XS_APR__UUID_DESTROY); /* prototype to pass -Wmissing-prototypes */ XS(XS_APR__UUID_DESTROY) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 1) croak_xs_usage(cv, "uuid"); { APR__UUID uuid; if (SvROK(ST(0))) { IV tmp = SvIV((SV*)SvRV(ST(0))); uuid = INT2PTR(APR__UUID,tmp); } else Perl_croak(aTHX_ "%s: %s is not a reference", "APR::UUID::DESTROY", "uuid"); apr_uuid_DESTROY(uuid); } XSRETURN_EMPTY; } #ifdef __cplusplus extern "C" #endif XS(boot_APR__UUID); /* prototype to pass -Wmissing-prototypes */ XS(boot_APR__UUID) { #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::UUID::new", XS_APR__UUID_new, file); (void)newXS("APR::UUID::parse", XS_APR__UUID_parse, file); (void)newXS("APR::UUID::DESTROY", XS_APR__UUID_DESTROY, file); /* Initialisation Section */ #line 63 "UUID.xs" items = items; /* -Wall */ cv = newXS("APR::UUID::format", MPXS_apr_uuid_format, __FILE__); #line 200 "UUID.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; }