blob: 3cf030e537b27d45b8c38a8fc6b434414ec4391a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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);
}
}
|