MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / construct

Method construct

include/win/boost/python/enum.hpp:80–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78// data.
79template <class T>
80void enum_<T>::construct(PyObject* obj, converter::rvalue_from_python_stage1_data* data)
81{
82#if PY_VERSION_HEX >= 0x03000000
83 T x = static_cast<T>(PyLong_AS_LONG(obj));
84#else
85 T x = static_cast<T>(PyInt_AS_LONG(obj));
86#endif
87 void* const storage = ((converter::rvalue_from_python_storage<T>*)data)->storage.bytes;
88 new (storage) T(x);
89 data->convertible = storage;
90}
91
92template <class T>
93inline enum_<T>& enum_<T>::value(char const* name, T x)

Callers 4

optionalMethod · 0.45
storage.hppFile · 0.45

Calls

no outgoing calls

Tested by 1