diff options
Diffstat (limited to 'src/perl/xsinit.c')
-rw-r--r-- | src/perl/xsinit.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/perl/xsinit.c b/src/perl/xsinit.c new file mode 100644 index 00000000..590eddb7 --- /dev/null +++ b/src/perl/xsinit.c @@ -0,0 +1,41 @@ +#if defined(__cplusplus) && !defined(PERL_OBJECT) +#define is_cplusplus +#endif + +#ifdef is_cplusplus +extern "C" { +#endif + +#include <EXTERN.h> +#include <perl.h> +#ifdef PERL_OBJECT +#define NO_XSLOCKS +#include <XSUB.h> +#include "win32iop.h" +#include <fcntl.h> +#include <perlhost.h> +#endif +#ifdef is_cplusplus +} +# ifndef EXTERN_C +# define EXTERN_C extern "C" +# endif +#else +# ifndef EXTERN_C +# define EXTERN_C extern +# endif +#endif + +EXTERN_C void xs_init _((void)); + +EXTERN_C void boot_DynaLoader _((CV* cv)); + +EXTERN_C void +xs_init(void) +{ + char *file = __FILE__; + dXSUB_SYS; + + /* DynaLoader is a special case */ + newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file); +} |