MCPcopy Create free account
hub / github.com/pybind/pybind11 / wrapGetPoints

Function wrapGetPoints

tests/exo_planet_c_api.cpp:37–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37extern "C" PyObject *wrapGetPoints(PyObject * /*self*/, PyObject *premium_traveler) {
38 const auto *cpp_premium_traveler = pybind11_conduit_v1::get_type_pointer_ephemeral<
39 pybind11_tests::test_cpp_conduit::PremiumTraveler>(premium_traveler);
40 if (cpp_premium_traveler == nullptr) {
41 return nullptr;
42 }
43 return PyLong_FromLong(static_cast<long>(cpp_premium_traveler->points));
44}
45
46PyMethodDef ThisMethodDef[] = {{"GetLuggage", wrapGetLuggage, METH_O, nullptr},
47 {"GetPoints", wrapGetPoints, METH_O, nullptr},

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected