GNOME Bugzilla – Bug 740203
Textured Logo scripts inappropriately defines a global
Last modified: 2014-11-18 20:38:50 UTC
Created attachment 290782 [details] [review] Patch to remove globally-defined 'scale' procedure plug-ins/script-fu/scripts/textured-logo.scm defines a global procedure named 'scale' whose only function is to return the product of its two arguments. While there may be valid reasons for having such a function such as disallowing variadic arguments and providing a better indication of what is being performed, it is inappropriate to do this in the global namespace of Script-fu. While this definition of 'scale' causes no problem with "factory" GIMP (the 'scale' procedure is not used anywhere outside of the two textured logo filters), it could lead to problems in third party scripts. Granted, the biggest problem of third-party scripts defining their own global 'scale' procedure is equally misguided, but that does not justify such practices appearing in "official" scripts that ship with GIMP. Patch attempts to resolve the problem by removing the definition of 'scale' and substituting any invocations of it with simple multiplication.
Thanks, pushed to gimp-2-8: commit 57603055c32a34b52d351cf7fb08a60c7f6ee428 Author: Saul Goode <saul@crazyauntgail.com> Date: Sat Nov 15 18:28:42 2014 -0500 Bug 740203 - Textured Logo scripts inappropriately defines a global Remove global proc def in textured-logo script. plug-ins/script-fu/scripts/textured-logo.scm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)