* Locks the given binding in the environment. * see ?bindingIsLocked * * @throw no_such_binding if there is no such binding in this environment */
| 250 | * @throw no_such_binding if there is no such binding in this environment |
| 251 | */ |
| 252 | void lockBinding(const std::string& name){ |
| 253 | if( !exists( name) ) throw no_such_binding(name) ; |
| 254 | SEXP nameSym = Rf_install(name.c_str()); |
| 255 | R_LockBinding( nameSym, Storage::get__() ); |
| 256 | } |
| 257 | |
| 258 | /** |
| 259 | * unlocks the given binding |