Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7e76721c3ebcfcdd42c09c4d2aadecd05fbe5bad0b7394c2b96afa26e808c025
Ticket: 655300ffffffffffffffffffffffffffffffffff
restore Tcl 7 compatibility of Tcl_MakeSafe
User & Date: jan.nijtmans on 2022-04-05 07:02:08
Changes

  1. assignee changed to: "jan.nijtmans"
  2. closer changed to: "nobody"
  3. comment changed to:
    The docs for Tcl_MakeSafe say:
    
         Tcl_MakeSafe makes interp ``safe'' by removing all
     non-core
         and  core  unsafe  functionality. Note that if you
    call this
         after adding some extension to an interpreter, all
    traces of
         that extension will be removed from the interpreter.
    
    It's not exactly clear to me what magical package
    unloading power is claimed for Tcl_MakeSafe, but
    it's clear that Tcl_MakeSafe doesn't have it.
    
    Consider:
    
        Tcl_Interp *i = Tcl_CreateInterp();
        Tcl_Eval(i, "package require Tk");
        Tcl_MakeSafe(i);
    
    At this point the Tk commands (both safe and unsafe)
    will still be defined in i.
    
  4. login: "jan.nijtmans"
  5. mimetype: "text/plain"
  6. severity changed to: "Minor"