#2821 Tk_Main calls Tcl_CreateInterp before Tcl_FindExecutable

obsolete: 8.6b1.1

Suggestion: move the Tcl_CreateInterp call out
of Tk_MainEx into the Tk_Main macro. The macro
then could look like:

#define Tk_Main(argc, argv, proc) Tk_MainEx(argc, argv, proc, \ (Tcl_FindExecutable(argv[0]), Tcl_CreateInterp()))

patch attached


  • Jan Nijtmans

    Jan Nijtmans - 2010-07-09

    suggested patch

  • Jan Nijtmans

    Jan Nijtmans - 2010-07-09


    But this is really a separate 'bug' which can be solved separately

  • Jan Nijtmans

    Jan Nijtmans - 2010-07-16
    • assigned_to: das --> nijtmans
    • status: open --> closed-fixed
  • Jan Nijtmans

    Jan Nijtmans - 2010-07-16

    Fixed in HEAD

  • Don Porter

    Don Porter - 2010-07-18

    perhaps too late, but this is a non-bug, don't
    you think?

    Tcl_CreateInterp() contains the measures needed
    so that it will not fail if called before Tcl_FindExecutable.

    This may well be an improved design -- I haven't taken
    the time to review it this time around -- but I don't think
    it's a bug fix.

  • Jan Nijtmans

    Jan Nijtmans - 2010-07-18

    In Feature Request #1711975, dkf wrote:

    > We shouldn't call Tcl_CreateInterp before Tcl_MainEx because there's an
    > assumption that Tcl_Main will call Tcl_FindExecutable (and hence
    > TclInitSubsystems IIRC) for you, and that's got to be called before
    > Tcl_CreateInter

    That was what inspired me to submit this "bug" report. I am not
    that familiar with exactly the measures that are taken in
    Tcl_CreateInterp, but - strictly speaking - yes, I think
    you are right.