"vscode:/vscode.git/clone" did not exist on "fab02efb10d5d3a057eba85752b91d1d77bfcd4b"
classh_module_local_0.cpp 635 Bytes
Newer Older
1
#include <pybind11/pybind11.h>
2
#include <pybind11/smart_holder.h>
3
4
5
6
7
8

#include <string>

namespace pybind11_tests {
namespace classh_module_local {

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

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

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

} // namespace classh_module_local
} // namespace pybind11_tests

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

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

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

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