allow nullptr string values (closes #138)

This commit is contained in:
Wenzel Jakob
2016-03-26 23:37:51 +01:00
parent 7393343f69
commit 9883ec01d7
4 changed files with 31 additions and 9 deletions

View File

@@ -29,4 +29,6 @@ void init_ex14(py::module &m) {
m.def("return_void_ptr", []() { return (void *) 1234; });
m.def("print_void_ptr", [](void *ptr) { std::cout << "Got void ptr : " << (uint64_t) ptr << std::endl; });
m.def("return_null_str", []() { return (char *) nullptr; });
m.def("print_null_str", [](char *ptr) { std::cout << "Got null str : " << (uint64_t) ptr << std::endl; });
}