Rice
3.0.0
|
A collection of functions (overloaded on number of arguments) for calling C functions that might raise Ruby exceptions. More...
#include "Object_defn.hpp"
#include "protect.ipp"
Go to the source code of this file.
Functions | |
template<typename Fun , typename ... ArgT> | |
VALUE | Rice::protect (Fun fun, ArgT const &... args) |
Call the C function f with arguments (arg1, arg2, ...). More... | |
A collection of functions (overloaded on number of arguments) for calling C functions that might raise Ruby exceptions.
VALUE Rice::protect | ( | Fun | fun, |
ArgT const &... | args | ||
) |
Call the C function f with arguments (arg1, arg2, ...).
E.g.:
Note that this function makes copies of all of its arguments; it does not take anything by reference. All of the copies are const so that protect will not work if f takes a non-const reference to any of its arguments (though you can use non-const pointers).
References Rice::protect().
Referenced by Rice::protect().