mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05: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:
parent
a2289ab8ae
commit
c5c2242ee3
@ -26,8 +26,7 @@ perl_sources = \
|
|||||||
perl-core.c \
|
perl-core.c \
|
||||||
perl-common.c \
|
perl-common.c \
|
||||||
perl-signals.c \
|
perl-signals.c \
|
||||||
perl-sources.c \
|
perl-sources.c
|
||||||
xsinit.c
|
|
||||||
|
|
||||||
perl_fe_sources = \
|
perl_fe_sources = \
|
||||||
module-formats.c \
|
module-formats.c \
|
||||||
|
@ -39,8 +39,6 @@
|
|||||||
# define PL_perl_destruct_level perl_destruct_level
|
# define PL_perl_destruct_level perl_destruct_level
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void xs_init(void);
|
|
||||||
|
|
||||||
GSList *perl_scripts;
|
GSList *perl_scripts;
|
||||||
PerlInterpreter *my_perl;
|
PerlInterpreter *my_perl;
|
||||||
|
|
||||||
@ -85,6 +83,8 @@ static void perl_script_destroy(PERL_SCRIPT_REC *script)
|
|||||||
g_free(script);
|
g_free(script);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern void boot_DynaLoader(CV* cv);
|
||||||
|
|
||||||
#if PERL_STATIC_LIBS == 1
|
#if PERL_STATIC_LIBS == 1
|
||||||
extern void boot_Irssi(CV *cv);
|
extern void boot_Irssi(CV *cv);
|
||||||
|
|
||||||
@ -97,14 +97,19 @@ XS(boot_Irssi_Core)
|
|||||||
irssi_boot(UI);
|
irssi_boot(UI);
|
||||||
irssi_boot(TextUI);
|
irssi_boot(TextUI);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void static_xs_init(void)
|
|
||||||
{
|
|
||||||
newXS("Irssi::Core::boot_Irssi_Core", boot_Irssi_Core, __FILE__);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#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 */
|
/* Initialize perl interpreter */
|
||||||
void perl_scripts_init(void)
|
void perl_scripts_init(void)
|
||||||
{
|
{
|
||||||
@ -118,11 +123,9 @@ void perl_scripts_init(void)
|
|||||||
my_perl = perl_alloc();
|
my_perl = perl_alloc();
|
||||||
perl_construct(my_perl);
|
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);
|
perl_parse(my_perl, xs_init, 3, args, NULL);
|
||||||
|
#if PERL_STATIC_LIBS == 1
|
||||||
|
perl_eval_pv("Irssi::Core::boot_Irssi_Core();", TRUE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
perl_common_start();
|
perl_common_start();
|
||||||
|
@ -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);
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user