Skip to content
Tcl Source Code History Of Ticket 1428575fffffffff
Login

History Of Ticket 1428575fffffffff

Artifacts Associated With Ticket 1428575fffffffff

  1. Ticket change [71e12be4f6] (rid 100759) by dgp on 2006-02-09 19:39:30:

    1. assignee initialized to: "andreas_kupries"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      TIP 219 confronted the difficult
      problem that the Tcl_Channel extension
      interface doesn't permit easy reporting
      of error information in the usual Tcl
      manner (code + msg + return options dictionary),
      but has a history of returning only
      a POSIX-style error code, a choice laid
      down long ago, apparently inspired by
      unix examples.
      
      The TIP 219 solution was to provide
      a pair of "bypass" areas where error
      information could be stored and retrieved.
      One area is attached to the Tcl_Interp;
      the other within the ChannelState struct.
      Each area has Get and Set accessors defined.
      
      In either case, the "error information"
      is passed into the "Set" accessor is
      a single Tcl_Obj value.  The value is
      documented to be a list made up of option
      value pairs followed by a string message.
      This format can be recognized as the
      return options dictionary converted to a list
      with the interp result lappended.
      
      No public Tcl routine returns error information
      in this format.  This forces the caller
      of Tcl_SetChannelError(Interp) to do this
      marshalling for themselves.  The one known
      caller of these routines, Tcl's own
      reflected channel support, indeed is forced
      to define two routines MarshallError() and
      UnmarshallError() to tend to this data formatting
      task.
      
      Seems to me all this complexity can be avoided
      by just having the Set/Get accessors accept
      two arguments, one for the interp result,
      and one for the return options dictionary.
      
      (I'm assuming the result code is not required,
      since these interfaces are intended only for
      the situation when the code is TCL_ERROR)
      
      So the request is to revise these interfaces
      to take two Tcl_Obj arguments instead of one.
      
      In addition, the "safety precaution" described
      in TIP 219, and implemented as FixLevelCode()
      is, I believe, completely unnecessary.  The
      -level and -code entries of the return options
      dictionary only have effect for a result code
      of TCL_RETURN.  Since these interfaces are 
      intended only for result codes of TCL_ERROR,
      there's no need to worry about them, assuming
      both sides of handling the bypass areas enforce
      the TCL_ERROR-only interpretation.
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "25. Channel System"
    10. title initialized to: "Revise Tcl_(Set|Get)ChannelError(Interp) interface"
    11. type initialized to: "RFE"
  2. Ticket change [ce6c9d74d9] (rid 96051) by andreas_kupries on 2006-02-10 02:58:13:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Note: Changing the API in this way will _not_ get rid of the
      (un)marshalling. At least not for the threaded case with the
      driver (tcl code) and channel residing in different threads.
      The transfer of the result across threads still requires the
      conversion to a string and later parsing out the components.
      What will change is the location of the unmarshalling, it
      will  happen before the Set(Interp|Channel)Error, instead of
      after Get(Interp|Channel)Error as is done right now.
      
      Regarding FixLevelCode I believe to remember that this was
      the part where I did enforce the restriction of TCL_ERROR. I
      do know that there is a piece of code converting break,
      continue, etc. result from the driver Tcl handler into
      errors. If that conversion alone causes the other parts of
      the core to ignore -level and -code entries then I will
      glady get the superfluous parts chucked.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  3. Ticket change [e309ef5e13] (rid 87722) by dgp on 2006-02-10 03:06:57:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      an interp belongs to only one thread,
      so the bypass area within that interp
      likewise belongs to only one thread.
      
      If we're forced to pass through string reps
      within the ChannelState struct to deal with
      passing data between threads, so be it.
      It should still be easier to convert both
      message and return options to/from their
      string rep without having to entangle
      and disentangle them into/out of one Tcl_Obj.
      
      will try to find time to produce a patch.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [1a8d7d005f] (rid 122997) by dgp on 2006-11-23 03:23:22:

    1. assignee changed to: "dgp"
    2. priority changed to: "8"
  5. Ticket change [05e465d75c] (rid 89127) by dgp on 2007-05-01 11:43:04:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      Just appending a comment so this
      report will go round the mailing list
      since several folks are looking at
      this code again during the valgrind
      bug hunt.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [964488c9b9] (rid 106296) by dgp on 2007-10-18 04:02:25:

    1. priority changed to: "9 Immediate"
  7. Ticket change [6d3a621a25] (rid 128655) by dgp on 2007-11-27 01:26:43:

    1. priority changed to: "7 High"