Skip to content
Tcl Source Code History Of Ticket 218005
Login

History Of Ticket 218005

Artifacts Associated With Ticket 218005

  1. Ticket change [e105570474] (rid 87375) by nobody on 2000-10-26 00:51:53:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 756 RFE
      Version: 8.0.3
      SubmitDate: '1998-10-22'
      LastModified: '1999-12-14'
      Severity: MED
      Status: Closed
      Submitter: admin
      ChangedBy: hobbs
      OS: All
      OSVersion: NA
      Machine: NA
      FixedDate: '2000-10-25'
      FixedInVersion: NA
      ClosedDate: '1999-12-14'
      
      
      #include <stdio.h>
      #include <stdlib.h>
      #include <tcl.h>
      
      /*
      ** This small program demonstrates what I believe to be a bug in the
      ** Tcl object routines.  I'm assuming that it was intended that the
      ** object routines can be used "external" to Tcl (i.e., without
      ** having to initialize an interpreter).  This is useful because
      ** it allows non-Tcl programs to generate Tcl-format lists that
      ** may be used as input to Tcl programs.  When compiled and run as
      ** written, this program works fine.  However, if the call to
      ** Tcl_GetObjType() is removed, the program seg. faults
      ** (access violation).
      **
      ** I'd appreciate it if you would consider making a change to the
      ** core sources to correct this at some point.
      **
      ** thanks,
      **
      ** Roy Lane, Compaq ([email protected])
      **
      ** (p.s., I'm using the 8.0.3 version of the Tcl sources)
      */
      
      main()
      
      {
          Tcl_Obj* list;
      
          /*
          ** A call to Tcl_GetObjType() is required to set up the "type
          ** table" used by objects in order to use the list routines
          ** independent of a Tcl interpreter.  This really is a kludge
          ** work-around I figured out after looking at the code.  The
          ** object routines should be modified so that they make sure
          ** the "type table" is properly initialized.
          */
      
          Tcl_GetObjType("");
      
          list = Tcl_NewListObj(0, 0);
      
          Tcl_ListObjAppendElement(0, list, Tcl_NewStringObj("test$name", -1));
      
          Tcl_ListObjAppendElement(0, list, Tcl_NewStringObj("mbox_name", -1));
      
          Tcl_ListObjAppendElement(0, list, Tcl_NewStringObj("5 2", -1));
      
          Tcl_ListObjAppendElement(0, list, Tcl_NewStringObj("", -1));
      
          printf("'%s'\n", Tcl_GetStringFromObj(list, 0));
      
          Tcl_DecrRefCount(list);
      
          return (EXIT_SUCCESS);
      }
      
      
      There are only a handful of routines "blessed" to be used before Tcl is initialized, and these are not a mong them.  -brent
      --
      See Brent's note above.  When interfacing with Tcl, a certain
      level of initialization is required for Tcl to operate properly. 
      -- 12/14/1999 hobbs
      
      
      
    4. foundin initialized to: "obsolete: 8.0.3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "10. Objects"
    10. title initialized to:
      bug in Tcl object routines: remove Tcl_GetObjType call, and 
      
    11. type initialized to: "Bug"
  2. Ticket change [2e6e350b86] (rid 119223) by welch on 2000-10-26 08:12:11:

    1. closedate changed to: "2000-10-26T01:12:11"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"