diff options
author | thegeorg <thegeorg@yandex-team.com> | 2023-10-03 11:19:48 +0300 |
---|---|---|
committer | thegeorg <thegeorg@yandex-team.com> | 2023-10-03 11:43:28 +0300 |
commit | cda0c13f23f6b169fb0a49dc504b40a0aaecea09 (patch) | |
tree | 26476e92e5af2c856e017afb1df8f8dff42495bf /library/cpp/pybind/pod.cpp | |
parent | 4854116da9c5e3c95bb8440f2ea997c54b6e1a61 (diff) | |
download | ydb-cda0c13f23f6b169fb0a49dc504b40a0aaecea09.tar.gz |
Move contrib/tools/jdk to build/platform/java/jdk/testing
Diffstat (limited to 'library/cpp/pybind/pod.cpp')
-rw-r--r-- | library/cpp/pybind/pod.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/library/cpp/pybind/pod.cpp b/library/cpp/pybind/pod.cpp new file mode 100644 index 00000000000..3cf030e537b --- /dev/null +++ b/library/cpp/pybind/pod.cpp @@ -0,0 +1,18 @@ +#include "pod.h" + +namespace NPyBind { + class TPODAttrGetter: public TBaseAttrGetter<TPOD> { + public: + bool GetAttr(PyObject*, const TPOD& self, const TString& attr, PyObject*& res) const override { + res = self.GetAttr(attr.c_str()); + return res != nullptr; + } + }; + + TPODTraits::TPODTraits() + : MyParent("TPOD", "simple struct") + { + AddGetter("", new TPODAttrGetter); + } + +} |