diff options
-rw-r--r-- | generic/tclInt.h | 1 | ||||
-rw-r--r-- | generic/tclInterp.c | 13 |
2 files changed, 5 insertions, 9 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index 65dcb4a..38d628a 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -3398,7 +3398,6 @@ MODULE_SCOPE Tcl_Obj * TclLsetFlat(Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *valuePtr); MODULE_SCOPE Tcl_Command TclMakeEnsemble(Tcl_Interp *interp, const char *name, const EnsembleImplMap map[]); -MODULE_SCOPE int TclMakeSafe(Tcl_Interp *interp); MODULE_SCOPE Tcl_Size TclMaxListLength(const char *bytes, Tcl_Size numBytes, const char **endPtr); MODULE_SCOPE int TclMergeReturnOptions(Tcl_Interp *interp, int objc, diff --git a/generic/tclInterp.c b/generic/tclInterp.c index bd79497..6e08bd7 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -268,6 +268,7 @@ static void SetScriptLimitCallback(Tcl_Interp *interp, int type, static void CallScriptLimitCallback(void *clientData, Tcl_Interp *interp); static void DeleteScriptLimitCallback(void *clientData); +static void MakeSafe(Tcl_Interp *interp); static void RunLimitHandlers(LimitHandler *handlerPtr, Tcl_Interp *interp); static void TimeLimitCallback(void *clientData); @@ -2481,9 +2482,7 @@ ChildCreate( ((Interp *) parentInterp)->maxNestingDepth; if (safe) { - if (TclMakeSafe(childInterp) == TCL_ERROR) { - goto error; - } + MakeSafe(childInterp); } else { if (Tcl_Init(childInterp) == TCL_ERROR) { goto error; @@ -3264,7 +3263,7 @@ Tcl_IsSafe( /* *---------------------------------------------------------------------- * - * TclMakeSafe -- + * MakeSafe -- * * Makes its argument interpreter contain only functionality that is * defined to be part of Safe Tcl. Unsafe commands are hidden, the env @@ -3280,8 +3279,8 @@ Tcl_IsSafe( *---------------------------------------------------------------------- */ -int -TclMakeSafe( +void +MakeSafe( Tcl_Interp *interp) /* Interpreter to be made safe. */ { Tcl_Channel chan; /* Channel to remove from safe interpreter. */ @@ -3355,8 +3354,6 @@ TclMakeSafe( if (chan != NULL) { Tcl_UnregisterChannel(interp, chan); } - - return TCL_OK; } /* |