1 #define PERL_NO_GET_CONTEXT 2 #include "EXTERN.h" 3 #include "perl.h" 4 #include "XSUB.h" 5 #define NEED_sv_2pv_nolen_GLOBAL 6 /* for vutil.c */ 7 #define NEED_my_snprintf 8 #define NEED_newRV_noinc 9 #define NEED_vnewSVpvf 10 #define NEED_newSVpvn_flags_GLOBAL 11 #define NEED_warner 12 #define NEED_ck_warner 13 #define NEED_croak_xs_usage 14 15 /* end vutil.c */ 16 #include "ppport.h" 17 #include "vutil.h" 18 #include "vutil.c" 19 20 /* -------------------------------------------------- 21 * $Revision: 2.5 $ 22 * --------------------------------------------------*/ 23 24 typedef SV *version_vxs; 25 26 #include "vxs.inc" 27 28 struct xsub_details { 29 const char *name; 30 XSUBADDR_t xsub; 31 #ifdef PERL_CORE 32 const char *proto; /* ignored */ 33 #endif 34 }; 35 36 static const struct xsub_details details[] = { 37 #define VXS_XSUB_DETAILS 38 #include "vxs.inc" 39 #undef VXS_XSUB_DETAILS 40 }; 41 42 MODULE = version::vxs PACKAGE = version::vxs 43 44 PROTOTYPES: DISABLE 45 VERSIONCHECK: DISABLE 46 47 BOOT: 48 { 49 #if PERL_VERSION_LT(5,9,0) 50 char* file = __FILE__; 51 #else 52 const char* file = __FILE__; 53 #endif 54 const struct xsub_details *xsub = details; 55 const struct xsub_details *end 56 = details + sizeof(details) / sizeof(details[0]); 57 /* register the overloading (type 'A') magic */ 58 PL_amagic_generation++; 59 do { 60 newXS((char*)xsub->name, xsub->xsub, file); 61 } while (++xsub < end); 62 } 63