Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 28, 2009, 5:04:38 PM (15 years ago)
Author:
landauf
Message:
  • bugfix in TclBind: Tcl_Init was only called if the constructor of Tcl::interpreter was called with a library path. The initialization is now moved from cpptcl to TclBind.
  • added a new command: TclThreadManager source <file>. This creates a non-interactive tcl-interpreter which executes a file. This allows for example to run the telnet_server.tcl script without a thread compatible tcl library. Warning: experimental state. A script-exit terminates Orxonox.
  • Several small changes in TclThreadManager
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource/src/cpptcl/changes_orxonox.diff

    r2710 r3360  
    2828           Tcl_SetResult(interp, const_cast<char*>(e.what()), TCL_VOLATILE);
    2929           return TCL_ERROR;
    30 @@ -858,6 +858,18 @@
    31       owner_ = true;
    32  }
    33  
    34 +interpreter::interpreter(string const &libpath)
    35 +{
    36 +     interp_ =  Tcl_CreateInterp();
    37 +     owner_ = true;
    38 +
    39 +     try
    40 +     {
    41 +        this->eval("set tcl_library \"" + libpath + "\"");
    42 +        Tcl_Init(this->interp_);
    43 +     } catch (...) {}
    44 +}
    45 +
    46  interpreter::interpreter(Tcl_Interp *interp, bool owner)
    47  {
    48       interp_ =  interp;
    49 --- cpptcl.h    Wed Jan 28 20:56:11 2009
    50 +++ cpptcl.h    Sat Jan 24 12:52:54 2009
    51 @@ -467,6 +467,7 @@
    52  {
    53  public:
    54       interpreter();
    55 +     interpreter(std::string const &libpath);
    56       interpreter(Tcl_Interp *, bool owner = true);
    57       ~interpreter();
    58      
Note: See TracChangeset for help on using the changeset viewer.