MCPcopy Create free account
hub / github.com/bab2min/tomotopy / call

Method call

src/python/handler/PyUtils.h:2597–2614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2595
2596 template<T func>
2597 static constexpr PyCFunctionWithKeywords call()
2598 {
2599 return [](PyObject* self, PyObject* args, PyObject* kwargs) -> PyObject*
2600 {
2601 return handleExc([&]() -> PyObject*
2602 {
2603 if constexpr (std::is_same_v<typename Base::ReturnType, void>)
2604 {
2605 Base::template call<func>((typename Base::ClassType*)self, args, kwargs, std::make_index_sequence<std::tuple_size_v<typename Base::ArgsTuple>>{});
2606 return buildPyValue(nullptr).release();
2607 }
2608 else
2609 {
2610 return buildPyValue(Base::template call<func>((typename Base::ClassType*)self, args, kwargs, std::make_index_sequence<std::tuple_size_v<typename Base::ArgsTuple>>{})).release();
2611 }
2612 });
2613 };
2614 }
2615
2616 template<T ptr>
2617 static constexpr lenfunc len()

Callers

nothing calls this directly

Calls 3

handleExcFunction · 0.85
buildPyValueFunction · 0.70
releaseMethod · 0.45

Tested by

no test coverage detected