| 88 | |
| 89 | namespace bolt::python { |
| 90 | void registerPythonFunction( |
| 91 | pybind11::function callable, |
| 92 | const std::string& functionName, |
| 93 | const TypePtr& returnType, |
| 94 | const size_t nArgs, |
| 95 | std::vector<pybind11::object> defaultArgs, |
| 96 | bool mapBatch) { |
| 97 | const size_t nOptionalArgs = defaultArgs.size(); |
| 98 | registerVectorFunction( |
| 99 | functionName, |
| 100 | mapBatch ? getSignatures(returnType) |
| 101 | : getSignatures(returnType, nArgs, nOptionalArgs), |
| 102 | std::make_unique<PythonFunction>( |
| 103 | std::move(callable), nArgs, std::move(defaultArgs), mapBatch)); |
| 104 | } |
| 105 | } // namespace bolt::python |
nothing calls this directly
no test coverage detected