classh_module_local_0.cpp 598 Bytes
Newer Older
1
2
3
4
5
6
7
#include <pybind11/classh.h>

#include <string>

namespace pybind11_tests {
namespace classh_module_local {

8
9
struct atyp { // Short for "any type".
    std::string mtxt;
10
11
};

12
std::string get_mtxt(const atyp &obj) { return obj.mtxt; }
13

14
atyp rtrn_valu_atyp() { return atyp(); }
15
16
17
18

} // namespace classh_module_local
} // namespace pybind11_tests

19
PYBIND11_CLASSH_TYPE_CASTERS(pybind11_tests::classh_module_local::atyp)
20
21
22
23

PYBIND11_MODULE(classh_module_local_0, m) {
    using namespace pybind11_tests::classh_module_local;

24
    m.def("get_mtxt", get_mtxt);
25

26
    m.def("rtrn_valu_atyp", rtrn_valu_atyp);
27
}