Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2600


Ignore:
Timestamp:
Jan 29, 2009, 7:04:03 PM (15 years ago)
Author:
rgrieder
Message:
  • Added changelog for CppTcl
  • Added unified diff file with our changes
  • Minimised our changes
Location:
code/branches/buildsystem2/src/cpptcl
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2/src/cpptcl/CppTcl.cc

    r1505 r2600  
    2525{
    2626     Tcl_Obj *obj = Tcl_GetObjResult(interp_);
    27 
     27     
    2828     int val, cc;
    2929     cc = Tcl_GetBooleanFromObj(interp_, obj, &val);
     
    3232          throw tcl_error(interp_);
    3333     }
    34 
     34     
    3535     return static_cast<bool>(val);
    3636}
     
    3939{
    4040     Tcl_Obj *obj = Tcl_GetObjResult(interp_);
    41 
     41     
    4242     double val;
    4343     int cc = Tcl_GetDoubleFromObj(interp_, obj, &val);
     
    4646          throw tcl_error(interp_);
    4747     }
    48 
     48     
    4949     return val;
    5050}
     
    5353{
    5454     Tcl_Obj *obj = Tcl_GetObjResult(interp_);
    55 
     55     
    5656     int val, cc;
    5757     cc = Tcl_GetIntFromObj(interp_, obj, &val);
     
    6060          throw tcl_error(interp_);
    6161     }
    62 
     62     
    6363     return val;
    6464}
     
    6767{
    6868     Tcl_Obj *obj = Tcl_GetObjResult(interp_);
    69 
     69     
    7070     long val;
    7171     int cc;
     
    7575          throw tcl_error(interp_);
    7676     }
    77 
     77     
    7878     return val;
    7979}
     
    195195          return false;
    196196     }
    197 
     197     
    198198     piti = pit->second.find(cmdName);
    199199     return piti != pit->second.end();
     
    284284          return TCL_ERROR;
    285285     }
    286 
     286     
    287287     string cmdName(Tcl_GetString(objv[0]));
    288288     callback_interp_map::iterator iti = it->second.find(cmdName);
     
    294294          return TCL_ERROR;
    295295     }
    296 
     296     
    297297     policies_map::iterator pit = call_policies.find(interp);
    298298     if (pit == call_policies.end())
     
    303303          return TCL_ERROR;
    304304     }
    305 
     305     
    306306     policies_interp_map::iterator piti;
    307307     if (find_policies(interp, cmdName, piti) == false)
     
    314314
    315315     policies &pol = piti->second;
    316 
     316     
    317317     try
    318318     {
     
    331331          return TCL_ERROR;
    332332     }
    333 
     333     
    334334     return TCL_OK;
    335335}
     
    397397          return TCL_ERROR;
    398398     }
    399 
     399     
    400400     string className(Tcl_GetString(objv[0]));
    401401     callback_interp_map::iterator iti = it->second.find(className);
     
    407407          return TCL_ERROR;
    408408     }
    409 
     409     
    410410     policies_interp_map::iterator piti;
    411411     if (find_policies(interp, className, piti) == false)
     
    904904          throw tcl_error(interp_);
    905905     }
    906 
     906 
    907907     return result(interp_);
    908908}
     
    924924          throw tcl_error(interp_);
    925925     }
    926 
     926 
    927927     return result(interp_);
    928928}
     
    10101010     Tcl_CreateObjCommand(interp_, name.c_str(),
    10111011          callback_handler, 0, 0);
    1012 
     1012     
    10131013     callbacks[interp_][name] = cb;
    10141014     call_policies[interp_][name] = p;
     
    10411041          throw tcl_error(interp);
    10421042     }
    1043 
     1043     
    10441044     return res;
    10451045}
     
    10531053          throw tcl_error(interp);
    10541054     }
    1055 
     1055     
    10561056     return res;
    10571057}
     
    10651065          throw tcl_error(interp);
    10661066     }
    1067 
     1067     
    10681068     return res != 0;
    10691069}
     
    10771077          throw tcl_error(interp);
    10781078     }
    1079 
     1079     
    10801080     return res;
    10811081}
  • code/branches/buildsystem2/src/cpptcl/CppTcl.h

    r1505 r2600  
    7070public:
    7171     result(Tcl_Interp *interp);
    72 
     72     
    7373     operator bool() const;
    7474     operator double() const;
     
    171171               throw tcl_error("Too few arguments.");
    172172          }
    173 
     173         
    174174          std::string methodName(Tcl_GetString(objv[1]));
    175175
     
    471471     interpreter(Tcl_Interp *, bool owner = true);
    472472     ~interpreter();
    473 
     473     
    474474     void make_safe();
    475 
     475     
    476476     Tcl_Interp * get() const { return interp_; }
    477477
    478      // free function definitions
    479 
     478     // free function definitions     
     479     
    480480     template <typename R>
    481481     void def(std::string const &name, R (*f)(),
     
    634634     }
    635635
    636      // free script evaluation
     636     // free script evaluation     
    637637     details::result eval(std::string const &script);
    638638     details::result eval(std::istream &s);
     
    838838          throw tcl_error(interp_);
    839839     }
    840 
     840 
    841841     return details::result(interp_);
    842842}
Note: See TracChangeset for help on using the changeset viewer.