see plug-ins/perl/Changes

This commit is contained in:
Marc Lehmann 1999-06-21 19:03:48 +00:00
parent cf1a647574
commit f6fdc9cf79
3 changed files with 22 additions and 8 deletions

View File

@ -1,6 +1,7 @@
Revision history for Gimp-Perl extension.
- enable embedded pod sections in standard register arguments.
- improved scm2perl ever so slightly.
1.093 Tue Jun 15 21:48:48 CEST 1999
- possible workaround for Gimp::Util::gimp_layer_get_position.

View File

@ -421,6 +421,18 @@ sub _croak($) {
croak($_[0]);
}
sub build_thunk($) {
my $sub = $_[0];
sub {
shift unless ref $_[0];
unshift @_,$sub;
#goto &gimp_call_procedure; # does not always work, PERLBUG! #FIXME
my @r=eval { gimp_call_procedure (@_) };
_croak $@ if $@;
wantarray ? @r : $r[0];
};
}
sub AUTOLOAD {
my ($class,$name) = $AUTOLOAD =~ /^(.*)::(.*?)$/;
for(@{"$class\::PREFIXES"}) {
@ -449,14 +461,7 @@ sub AUTOLOAD {
};
goto &$AUTOLOAD;
} elsif (_gimp_procedure_available ($sub)) {
*{$AUTOLOAD} = sub {
shift unless ref $_[0];
unshift @_,$sub;
#goto &gimp_call_procedure; # does not always work, PERLBUG! #FIXME
my @r=eval { gimp_call_procedure (@_) };
_croak $@ if $@;
wantarray ? @r : $r[0];
};
*{$AUTOLOAD} = build_thunk ($sub);
goto &$AUTOLOAD;
}
}

View File

@ -86,6 +86,9 @@ $parser = new Parse::RecDescent <<'EOA';
'SF-COLOR' => 'PF_COLOUR, ',
'SF-ADJUSTMENT' => 'PF_ADJUSTMENT,',
'SF-FONT' => 'PF_FONT, ',
'SF-PATTERN' => 'PF_PATTERN, ',
'SF-GRADIENT' => 'PF_GRADIENT, ',
'SF-FILENAME' => 'PF_FILE, ',
);
my %constant = qw(
TRUE 1
@ -115,6 +118,10 @@ $parser = new Parse::RecDescent <<'EOA';
SCREEN SCREEN_MODE
SUBTRACT SUBTRACT_MODE
VALUE VALUE_MODE
ALPHA_MASK ADD_ALPHA_MASK
BLACK_MASK ADD_BLACK_MASK
WHITE_MASK ADD_WHITE_MASK
*pi* 3.14159265
);
@ -422,6 +429,7 @@ EOA
print STDERR "reading($in)..." unless $quiet;
{ local $/; $file = <IN> }
$file =~ s/;.*?$//gm;
$::filesize = length $file; # make it clear this is a _global_ variable
print STDERR "translating..." unless $quiet;