Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/cpptcl/changes_orxonox.diff @ 3188

Last change on this file since 3188 was 2710, checked in by rgrieder, 16 years ago

Merged buildsystem3 containing buildsystem2 containing Adi's buildsystem branch back to the trunk.
Please update the media directory if you were not using buildsystem3 before.

  • Property svn:eol-style set to native
File size: 1.6 KB
RevLine 
[2705]1--- cpptcl.cc   So Feb  8 23:14:34 2009
2+++ cpptcl.cc   So Feb  8 23:13:07 2009
3@@ -320,7 +320,7 @@
4 
5           post_process_policies(interp, pol, objv, false);
6      }
7-     catch (exception const &e)
8+     catch (std::exception const &e)
9      {
10           Tcl_SetResult(interp, const_cast<char*>(e.what()), TCL_VOLATILE);
11           return TCL_ERROR;
12@@ -363,7 +363,7 @@
13 
14           post_process_policies(interp, pol, objv, true);
15      }
16-     catch (exception const &e)
17+     catch (std::exception const &e)
18      {
19           Tcl_SetResult(interp, const_cast<char*>(e.what()), TCL_VOLATILE);
20           return TCL_ERROR;
21@@ -430,7 +430,7 @@
22                Tcl_GetString(Tcl_GetObjResult(interp)),
23                object_handler, static_cast<ClientData>(chb), 0);
24      }
25-     catch (exception const &e)
26+     catch (std::exception const &e)
27      {
28           Tcl_SetResult(interp, const_cast<char*>(e.what()), TCL_VOLATILE);
29           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 TracBrowser for help on using the repository browser.