summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinstallperl3
-rw-r--r--makedef.pl12
-rw-r--r--win32/perllib.c110
3 files changed, 39 insertions, 86 deletions
diff --git a/installperl b/installperl
index dae86a5c0e..7c0bed7acf 100755
--- a/installperl
+++ b/installperl
@@ -156,8 +156,7 @@ if ($Is_Cygwin) {
};
};
} else {
- $perldll = 'perl.' . $dlext;
- $perldll = 'perl56.' . $dlext if $Config{'ccflags'} =~ /PERL_OBJECT/i;
+ $perldll = 'perl56.' . $dlext;
}
if ($dlsrc ne "dl_none.xs") {
diff --git a/makedef.pl b/makedef.pl
index 1490f89b49..eb927198e5 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -101,23 +101,15 @@ close(CFG);
if ($PLATFORM eq 'win32') {
warn join(' ',keys %define)."\n";
- if ($define{PERL_OBJECT}) {
+ if ($define{PERL_OBJECT} || $define{MULTIPLICITY}) {
print "LIBRARY Perl56\n";
print "DESCRIPTION 'Perl interpreter'\n";
print "EXPORTS\n";
-# output_symbol("perl_alloc");
output_symbol("perl_get_host_info");
output_symbol("perl_alloc_override");
-# output_symbol("perl_construct");
-# output_symbol("perl_destruct");
-# output_symbol("perl_free");
-# output_symbol("perl_parse");
-# output_symbol("perl_run");
-# output_symbol("RunPerl");
-# exit(0);
}
else {
- print "LIBRARY Perl\n";
+ print "LIBRARY Perl56\n";
print "DESCRIPTION 'Perl interpreter, export autogenerated'\n";
print "EXPORTS\n";
}
diff --git a/win32/perllib.c b/win32/perllib.c
index 9ccf5a0043..84a2a6dc4b 100644
--- a/win32/perllib.c
+++ b/win32/perllib.c
@@ -87,8 +87,6 @@ perl_get_host_info(struct IPerlMemInfo* perlMemInfo,
}
}
-#ifdef PERL_OBJECT
-
EXTERN_C PerlInterpreter*
perl_alloc_override(struct IPerlMem** ppMem, struct IPerlMem** ppMemShared,
struct IPerlMem** ppMemParse, struct IPerlEnv** ppEnv,
@@ -97,33 +95,26 @@ perl_alloc_override(struct IPerlMem** ppMem, struct IPerlMem** ppMemShared,
struct IPerlProc** ppProc)
{
PerlInterpreter *my_perl = NULL;
- try
- {
- CPerlHost* pHost = new CPerlHost(ppMem, ppMemShared, ppMemParse, ppEnv,
- ppStdIO, ppLIO, ppDir, ppSock, ppProc);
-
- if (pHost) {
- my_perl = perl_alloc_using(pHost->m_pHostperlMem,
- pHost->m_pHostperlMemShared,
- pHost->m_pHostperlMemParse,
- pHost->m_pHostperlEnv,
- pHost->m_pHostperlStdIO,
- pHost->m_pHostperlLIO,
- pHost->m_pHostperlDir,
- pHost->m_pHostperlSock,
- pHost->m_pHostperlProc);
- if (my_perl) {
- CPerlObj* pPerl = (CPerlObj*)my_perl;
- w32_internal_host = pHost;
- }
+ CPerlHost* pHost = new CPerlHost(ppMem, ppMemShared, ppMemParse, ppEnv,
+ ppStdIO, ppLIO, ppDir, ppSock, ppProc);
+
+ if (pHost) {
+ my_perl = perl_alloc_using(pHost->m_pHostperlMem,
+ pHost->m_pHostperlMemShared,
+ pHost->m_pHostperlMemParse,
+ pHost->m_pHostperlEnv,
+ pHost->m_pHostperlStdIO,
+ pHost->m_pHostperlLIO,
+ pHost->m_pHostperlDir,
+ pHost->m_pHostperlSock,
+ pHost->m_pHostperlProc);
+ if (my_perl) {
+#ifdef PERL_OBJECT
+ CPerlObj* pPerl = (CPerlObj*)my_perl;
+#endif
+ w32_internal_host = pHost;
}
}
- catch(...)
- {
- win32_fprintf(stderr, "%s\n", "Error: Unable to allocate memory");
- my_perl = NULL;
- }
-
return my_perl;
}
@@ -131,34 +122,29 @@ EXTERN_C PerlInterpreter*
perl_alloc(void)
{
PerlInterpreter* my_perl = NULL;
- try
- {
- CPerlHost* pHost = new CPerlHost();
- if (pHost) {
- my_perl = perl_alloc_using(pHost->m_pHostperlMem,
- pHost->m_pHostperlMemShared,
- pHost->m_pHostperlMemParse,
- pHost->m_pHostperlEnv,
- pHost->m_pHostperlStdIO,
- pHost->m_pHostperlLIO,
- pHost->m_pHostperlDir,
- pHost->m_pHostperlSock,
- pHost->m_pHostperlProc);
- if (my_perl) {
- CPerlObj* pPerl = (CPerlObj*)my_perl;
- w32_internal_host = pHost;
- }
+ CPerlHost* pHost = new CPerlHost();
+ if (pHost) {
+ my_perl = perl_alloc_using(pHost->m_pHostperlMem,
+ pHost->m_pHostperlMemShared,
+ pHost->m_pHostperlMemParse,
+ pHost->m_pHostperlEnv,
+ pHost->m_pHostperlStdIO,
+ pHost->m_pHostperlLIO,
+ pHost->m_pHostperlDir,
+ pHost->m_pHostperlSock,
+ pHost->m_pHostperlProc);
+ if (my_perl) {
+#ifdef PERL_OBJECT
+ CPerlObj* pPerl = (CPerlObj*)my_perl;
+#endif
+ w32_internal_host = pHost;
}
}
- catch(...)
- {
- win32_fprintf(stderr, "%s\n", "Error: Unable to allocate memory");
- my_perl = NULL;
- }
-
return my_perl;
}
+#ifdef PERL_OBJECT
+
EXTERN_C void
perl_construct(PerlInterpreter* my_perl)
{
@@ -263,30 +249,6 @@ perl_parse(PerlInterpreter* my_perl, void (*xsinit)(CPerlObj*), int argc, char**
#undef PL_perl_destruct_level
#define PL_perl_destruct_level int dummy
-#else /* !PERL_OBJECT */
-
-EXTERN_C PerlInterpreter*
-perl_alloc(void)
-{
- PerlInterpreter *my_perl = NULL;
- CPerlHost* pHost = new CPerlHost();
- if (pHost) {
- my_perl = perl_alloc_using(pHost->m_pHostperlMem,
- pHost->m_pHostperlMemShared,
- pHost->m_pHostperlMemParse,
- pHost->m_pHostperlEnv,
- pHost->m_pHostperlStdIO,
- pHost->m_pHostperlLIO,
- pHost->m_pHostperlDir,
- pHost->m_pHostperlSock,
- pHost->m_pHostperlProc);
- if (my_perl) {
- w32_internal_host = pHost;
- }
- }
- return my_perl;
-}
-
#endif /* PERL_OBJECT */
#endif /* PERL_IMPLICIT_SYS */