From 16041ddbd4888ead8e8ee324b5549d84445df87b Mon Sep 17 00:00:00 2001 From: Marc Lehmann Date: Sun, 11 Jul 1999 13:32:58 +0000 Subject: [PATCH] see plug-ins/perl/Changes --- plug-ins/perl/Gimp/Lib.xs | 8 +++++--- plug-ins/perl/Perl-Server | 4 ++-- plug-ins/perl/examples/scratches.pl | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/plug-ins/perl/Gimp/Lib.xs b/plug-ins/perl/Gimp/Lib.xs index 041eb8e665..4ceede1dd7 100644 --- a/plug-ins/perl/Gimp/Lib.xs +++ b/plug-ins/perl/Gimp/Lib.xs @@ -895,7 +895,7 @@ push_gimp_sv (GParam *arg, int array_as_ref) PUTBACK; } -#define SvPv(sv) SvPV_nolen(sv) +#define SvPv(sv) (SvOK(sv) ? SvPV_nolen(sv) : NULL) #define Sv32(sv) unbless ((sv), PKG_ANY, croak_str) #define av2gimp(arg,sv,datatype,type,svxv) { \ @@ -1612,14 +1612,14 @@ gimp_call_procedure (proc_name, ...) } void -gimp_install_procedure(name, blurb, help, author, copyright, date, menu_path, image_types, type, params, return_vals) +gimp_install_procedure(name, blurb, help, author, copyright, date, menu_path_sv, image_types, type, params, return_vals) char * name char * blurb char * help char * author char * copyright char * date - char * menu_path + SV * menu_path_sv char * image_types int type SV * params @@ -1628,6 +1628,8 @@ gimp_install_procedure(name, blurb, help, author, copyright, date, menu_path, im gimp_install_temp_proc = 1 CODE: { + char *menu_path = SvPv (menu_path_sv); + if (SvROK(params) && SvTYPE(SvRV(params)) == SVt_PVAV && SvROK(return_vals) && SvTYPE(SvRV(return_vals)) == SVt_PVAV) { diff --git a/plug-ins/perl/Perl-Server b/plug-ins/perl/Perl-Server index d76910e16f..65fdae1892 100755 --- a/plug-ins/perl/Perl-Server +++ b/plug-ins/perl/Perl-Server @@ -315,7 +315,7 @@ sub query { "Plug-ins should register their custom constants using this function, so". "other plug-ins (notably script-languages) can access these using symbolic names", "Marc Lehmann ", "Marc Lehmann", "1999-07-07", - "", "*",&Gimp::PROC_EXTENSION, + undef, "*",&Gimp::PROC_EXTENSION, [ [&Gimp::PARAM_STRING, "procedure", "The name of the function that uses this constant"], [&Gimp::PARAM_STRING, "arg_num", "The name of the argument that this constant is used for"], @@ -325,7 +325,7 @@ sub query { Gimp->install_procedure("gimp_procedural_db_set_default", "Set the default value for a plug-in argument", "Plug-ins should register default values for their arguments", "Marc Lehmann ", "Marc Lehmann", "1999-07-07", - "", "*",&Gimp::PROC_EXTENSION, + undef, "*",&Gimp::PROC_EXTENSION, [ [&Gimp::PARAM_STRING, "procedure", "The name of the function that uses this constant"], [&Gimp::PARAM_STRING, "arg_num", "The name of the argument that this constant is used for"], diff --git a/plug-ins/perl/examples/scratches.pl b/plug-ins/perl/examples/scratches.pl index 0903ce4e1b..69294e5e78 100755 --- a/plug-ins/perl/examples/scratches.pl +++ b/plug-ins/perl/examples/scratches.pl @@ -13,7 +13,8 @@ sub new_scratchlayer { $layer->fill (WHITE_IMAGE_FILL); $layer->noisify (0, 1, 1, 1, 0); $layer->mblur (0, $length, $angle); - $layer->levels (VALUE_LUT, 120, 255, $gamma, 0, 255); + #$layer->levels (VALUE_LUT, 120, 255, $gamma, 0, 255); + $layer->levels (VALUE_LUT, 120, 255, 0.3, 0, 255); $layer; }