summaryrefslogtreecommitdiff
path: root/makedef.pl
diff options
context:
space:
mode:
Diffstat (limited to 'makedef.pl')
-rw-r--r--makedef.pl35
1 files changed, 34 insertions, 1 deletions
diff --git a/makedef.pl b/makedef.pl
index 1b77855814..eaeb269a8d 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -100,6 +100,33 @@ while (<CFG>) {
}
close(CFG);
+# perl.h logic duplication begins
+
+if ($define{USE_ITHREADS}) {
+ if (!$define{MULTIPLICITY} && !defined{PERL_OBJECT}) {
+ $define{MULTIPLICITY} = 1;
+ }
+}
+
+$define{PERL_IMPLICIT_CONTEXT} ||=
+ $define{USE_ITHREADS} ||
+ $define{USE_THREADS} ||
+ $define{MULTIPLICITY} ;
+
+if ($define{PERL_CAPI}) {
+ delete $define{PERL_OBJECT};
+ $define{MULTIPLICITY} = 1;
+ $define{PERL_IMPLICIT_CONTEXT} = 1;
+ $define{PERL_IMPLICIT_SYS} = 1;
+}
+
+if ($define{PERL_OBJECT}) {
+ $define{PERL_IMPLICIT_CONTEXT} = 1;
+ $define{PERL_IMPLICIT_SYS} = 1;
+}
+
+# perl.h logic duplication ends
+
if ($PLATFORM eq 'win32') {
warn join(' ',keys %define)."\n";
print "LIBRARY Perl56\n";
@@ -472,7 +499,13 @@ for my $syms (@syms) {
# variables
if ($define{'PERL_OBJECT'} || $define{'MULTIPLICITY'}) {
- for my $f ($perlvars_h, $intrpvar_h, $thrdvar_h) {
+ for my $f ($perlvars_h) {
+ my $glob = readvar($f, sub { "Perl_" . $_[1] . $_[2] . "_ptr" });
+ emit_symbols $glob;
+ $glob = readvar($f);
+ emit_symbols $glob;
+ }
+ for my $f ($intrpvar_h, $thrdvar_h) {
my $glob = readvar($f, sub { "Perl_" . $_[1] . $_[2] . "_ptr" });
emit_symbols $glob;
}