Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/src/cpptcl/changes_orxonox.diff @ 2624

Last change on this file since 2624 was 2600, checked in by rgrieder, 16 years ago
  • Added changelog for CppTcl
  • Added unified diff file with our changes
  • Minimised our changes
File size: 1.1 KB
RevLine 
[2600]1--- cpptcl.cc   Wed Jan 28 20:56:06 2009
2+++ cpptcl.cc   Sat Jan 24 12:52:54 2009
3@@ -858,6 +858,18 @@
4      owner_ = true;
5 }
6 
7+interpreter::interpreter(string const &libpath)
8+{
9+     interp_ =  Tcl_CreateInterp();
10+     owner_ = true;
11+
12+     try
13+     {
14+        this->eval("set tcl_library " + libpath);
15+        Tcl_Init(this->interp_);
16+     } catch (...) {}
17+}
18+
19 interpreter::interpreter(Tcl_Interp *interp, bool owner)
20 {
21      interp_ =  interp;
22@@ -940,6 +952,10 @@
23      // delete all callbacks that were registered for given interpreter
24 
25      {
26+          // TODO: why could this probably be necessary? map::find of empty map
27+          // shouldn't be a problem.
28+          if (callbacks.size() == 0)
29+            return;
30           callback_map::iterator it = callbacks.find(interp);
31           if (it == callbacks.end())
32           {
33--- cpptcl.h    Wed Jan 28 20:56:11 2009
34+++ cpptcl.h    Sat Jan 24 12:52:54 2009
35@@ -467,6 +467,7 @@
36 {
37 public:
38      interpreter();
39+     interpreter(std::string const &libpath);
40      interpreter(Tcl_Interp *, bool owner = true);
41      ~interpreter();
42     
Note: See TracBrowser for help on using the repository browser.