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

Method initFromPython

src/python/handler/PyUtils.h:1830–1840  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1828 private:
1829 template<class InitArgs, size_t ...idx>
1830 PY_STRONG_INLINE static void initFromPython(Derived* self, PyObject* args, std::index_sequence<idx...>)
1831 {
1832 auto temp = self->ob_base;
1833 auto temp2 = self->managedDict;
1834 auto temp3 = self->managedWeakList;
1835 self->~Derived();
1836 new (self) Derived{ toCpp<std::tuple_element_t<idx, InitArgs>>(PyTuple_GetItem(args, idx))... };
1837 self->ob_base = temp;
1838 self->managedDict = temp2;
1839 self->managedWeakList = temp3;
1840 }
1841
1842 static int init(Derived* self, PyObject* args, PyObject* kwargs)
1843 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected