1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-01 04:14:16 -04:00

Boot dynaloader too even if perl libraries are compiled statically in irssi.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1917 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-10-25 10:00:33 +00:00 committed by cras
parent a2289ab8ae
commit c5c2242ee3
3 changed files with 16 additions and 57 deletions

View File

@ -26,8 +26,7 @@ perl_sources = \
perl-core.c \
perl-common.c \
perl-signals.c \
perl-sources.c \
xsinit.c
perl-sources.c
perl_fe_sources = \
module-formats.c \

View File

@ -39,8 +39,6 @@
# define PL_perl_destruct_level perl_destruct_level
#endif
extern void xs_init(void);
GSList *perl_scripts;
PerlInterpreter *my_perl;
@ -85,6 +83,8 @@ static void perl_script_destroy(PERL_SCRIPT_REC *script)
g_free(script);
}
extern void boot_DynaLoader(CV* cv);
#if PERL_STATIC_LIBS == 1
extern void boot_Irssi(CV *cv);
@ -97,14 +97,19 @@ XS(boot_Irssi_Core)
irssi_boot(UI);
irssi_boot(TextUI);
}
static void static_xs_init(void)
{
newXS("Irssi::Core::boot_Irssi_Core", boot_Irssi_Core, __FILE__);
}
#endif
static void xs_init(void)
{
#if PERL_STATIC_LIBS == 1
newXS("Irssi::Core::boot_Irssi_Core", boot_Irssi_Core, __FILE__);
#endif
/* boot the dynaloader too, if we want to use some
other dynamic modules.. */
newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, __FILE__);
}
/* Initialize perl interpreter */
void perl_scripts_init(void)
{
@ -118,11 +123,9 @@ void perl_scripts_init(void)
my_perl = perl_alloc();
perl_construct(my_perl);
#if PERL_STATIC_LIBS == 1
perl_parse(my_perl, static_xs_init, 3, args, NULL);
perl_eval_pv("Irssi::Core::boot_Irssi_Core();", TRUE);
#else
perl_parse(my_perl, xs_init, 3, args, NULL);
#if PERL_STATIC_LIBS == 1
perl_eval_pv("Irssi::Core::boot_Irssi_Core();", TRUE);
#endif
perl_common_start();

View File

@ -1,43 +0,0 @@
#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 PerlInterpreter *my_perl;
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);
}