Did trivial GimpRGB changes in perl.

This commit is contained in:
Seth Burgess 2001-02-13 04:19:12 +00:00
parent 7986a191a7
commit 6363145c3f
2 changed files with 15 additions and 10 deletions

View File

@ -1,3 +1,8 @@
2001-02-13 Seth Burgess <sjburges@gimp.org>
* plug-ins/perl/Gimp/Lib.xs : made perl compilable again. Didn't
change to turn back on by default.
2001-02-13 Sven Neumann <sven@gimp.org>
* Makefile.am

View File

@ -489,9 +489,9 @@ dump_params (int nparams, GimpParam *args, GimpParamDef *params)
case GIMP_PDB_COLOR:
trace_printf ("[%d,%d,%d]",
args[i].data.d_color.red,
args[i].data.d_color.green,
args[i].data.d_color.blue);
args[i].data.d_color.r,
args[i].data.d_color.g,
args[i].data.d_color.b);
break;
#if GIMP_PARASITE
@ -701,7 +701,7 @@ unbless_croak (SV *sv, char *type)
}
static void
canonicalize_colour (char *err, SV *sv, GimpParamColor *c)
canonicalize_colour (char *err, SV *sv, GimpRGB *c)
{
dSP;
@ -725,9 +725,9 @@ canonicalize_colour (char *err, SV *sv, GimpParamColor *c)
AV *av = (AV *)SvRV(sv);
if (av_len(av) == 2)
{
c->red = SvIV(*av_fetch(av, 0, 0));
c->green = SvIV(*av_fetch(av, 1, 0));
c->blue = SvIV(*av_fetch(av, 2, 0));
c->r = SvIV(*av_fetch(av, 0, 0));
c->g = SvIV(*av_fetch(av, 1, 0));
c->b = SvIV(*av_fetch(av, 2, 0));
}
else
sprintf (err, __("a color must have three components (array elements)"));
@ -857,9 +857,9 @@ push_gimp_sv (GimpParam *arg, int array_as_ref)
{
/* difficult */
AV *av = newAV ();
av_push (av, newSViv (arg->data.d_color.red));
av_push (av, newSViv (arg->data.d_color.green));
av_push (av, newSViv (arg->data.d_color.blue));
av_push (av, newSViv (arg->data.d_color.r));
av_push (av, newSViv (arg->data.d_color.g));
av_push (av, newSViv (arg->data.d_color.b));
sv = (SV *)av; /* no newRV_inc, since we're getting autoblessed! */
}
break;