Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 2641 was 2641, checked in by rgrieder, 15 years ago
  • Update to boost 1.37: System library is now REQUIRED when finding boost even if you have less than boost 1.35. If this is problem, it's going to get quite ugly, but it's possible.
  • Fixed a problem in cpptcl.cc: Boost 1.36 introduced boost::exception which conflicted with std::exception (cpptcl makes use of 'using namespace'…)
  • Fixed two little bugs for tolua bind files and gcc warnings
File size: 2.0 KB
  • cpptcl.cc

     
    320320
    321321          post_process_policies(interp, pol, objv, false);
    322322     }
    323      catch (exception const &e)
     323     catch (std::exception const &e)
    324324     {
    325325          Tcl_SetResult(interp, const_cast<char*>(e.what()), TCL_VOLATILE);
    326326          return TCL_ERROR;
     
    363363
    364364          post_process_policies(interp, pol, objv, true);
    365365     }
    366      catch (exception const &e)
     366     catch (std::exception const &e)
    367367     {
    368368          Tcl_SetResult(interp, const_cast<char*>(e.what()), TCL_VOLATILE);
    369369          return TCL_ERROR;
     
    430430               Tcl_GetString(Tcl_GetObjResult(interp)),
    431431               object_handler, static_cast<ClientData>(chb), 0);
    432432     }
    433      catch (exception const &e)
     433     catch (std::exception const &e)
    434434     {
    435435          Tcl_SetResult(interp, const_cast<char*>(e.what()), TCL_VOLATILE);
    436436          return TCL_ERROR;
     
    858858     owner_ = true;
    859859}
    860860
     861interpreter::interpreter(string const &libpath)
     862{
     863     interp_ =  Tcl_CreateInterp();
     864     owner_ = true;
     865
     866     try
     867     {
     868        this->eval("set tcl_library " + libpath);
     869        Tcl_Init(this->interp_);
     870     } catch (...) {}
     871}
     872
    861873interpreter::interpreter(Tcl_Interp *interp, bool owner)
    862874{
    863875     interp_ =  interp;
     
    940952     // delete all callbacks that were registered for given interpreter
    941953
    942954     {
     955          // TODO: why could this probably be necessary? map::find of empty map
     956          // shouldn't be a problem.
     957          if (callbacks.size() == 0)
     958            return;
    943959          callback_map::iterator it = callbacks.find(interp);
    944960          if (it == callbacks.end())
    945961          {
  • cpptcl.h

     
    467467{
    468468public:
    469469     interpreter();
     470     interpreter(std::string const &libpath);
    470471     interpreter(Tcl_Interp *, bool owner = true);
    471472     ~interpreter();
    472473     
Note: See TracBrowser for help on using the repository browser.