From c4f418ddbd4f1743368cb4b3f70c4cb9f83f7d9a Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 5 Nov 2009 19:18:52 +0000 Subject: * library/safe.tcl: A series of patches which bring the SafeBase up to date with code guidelines, Tcl's features, also eliminating a number of inefficiencies along the way. (2) Move the procedures out of the namespace eval. Keep their locations. IOW, break the namespace eval apart into small sectionsnot covering the procedure definitions. --- ChangeLog | 3 +++ library/safe.tcl | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75f4d1b..942d74f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,9 @@ up to date with code guidelines, Tcl's features, also eliminating a number of inefficiencies along the way. (1) Change all procedure names to be fully qualified. + (2) Move the procedures out of the namespace eval. Keep their + locations. IOW, break the namespace eval apart into small + sectionsnot covering the procedure definitions. 2009-11-02 Kevin B. Kenny diff --git a/library/safe.tcl b/library/safe.tcl index 4d42f2e..5520261 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.20 2009/11/05 19:07:35 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.21 2009/11/05 19:18:52 andreas_kupries Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -68,6 +68,7 @@ namespace eval ::safe { lappend ::tcl::OptDesc(::safe::interpIC) $::tcl::OptDesc($temp) # temp not needed anymore ::tcl::OptKeyDelete $temp +} # Helper function to resolve the dual way of specifying staticsok (either # by -noStatics or -statics 0) @@ -581,8 +582,10 @@ proc ::safe::setLogCmd {args} { } } +namespace eval ::safe { # internal variable variable Log {} +} # ------------------- END OF PUBLIC METHODS ------------ @@ -1042,4 +1045,3 @@ proc ::safe::setLogCmd {args} { Log $slave $msg error $msg } -} -- cgit v0.12