summaryrefslogtreecommitdiff
path: root/embed.pl
diff options
context:
space:
mode:
Diffstat (limited to 'embed.pl')
-rwxr-xr-xembed.pl24
1 files changed, 11 insertions, 13 deletions
diff --git a/embed.pl b/embed.pl
index 5ade24a6c2..6bbcd0105a 100755
--- a/embed.pl
+++ b/embed.pl
@@ -46,43 +46,41 @@ print EM <<'END';
#ifdef MULTIPLICITY
-/* Undefine symbols that were defined by EMBED. Somewhat ugly */
-
END
-
open(INT, "<interp.sym") || die "Can't open interp.sym: $!\n";
while (<INT>) {
s/[ \t]*#.*//; # Delete comments.
next unless /\S/;
- s/^\s*(\S*).*$/#undef $1/;
- print EM $_ if (exists $global{$1});
+ s/^\s*(\S+).*$/#define $1\t\t(curinterp->I$1)/;
+ s/(................\t)\t/$1/;
+ print EM $_;
}
close(INT) || warn "Can't close interp.sym: $!\n";
-print EM "\n";
+print EM <<'END';
+
+#else /* not multiple, so translate interpreter symbols the other way... */
+
+END
open(INT, "<interp.sym") || die "Can't open interp.sym: $!\n";
while (<INT>) {
s/[ \t]*#.*//; # Delete comments.
next unless /\S/;
- s/^\s*(\S+).*$/#define $1\t\t(curinterp->I$1)/;
+ s/^\s*(\S+).*$/#define I$1\t\t$1/;
s/(................\t)\t/$1/;
print EM $_;
}
close(INT) || warn "Can't close interp.sym: $!\n";
-print EM <<'END';
-
-#else /* not multiple, so translate interpreter symbols the other way... */
-
-END
+print EM "\n";
open(INT, "<interp.sym") || die "Can't open interp.sym: $!\n";
while (<INT>) {
s/[ \t]*#.*//; # Delete comments.
next unless /\S/;
- s/^\s*(\S+).*$/#define I$1\t\t$1/;
+ s/^\s*(\S+).*$/#define $1\t\tPerl_$1/;
s/(................\t)\t/$1/;
print EM $_;
}