Wenzel Jakob | 17cdb06 | 2016-03-10 13:24:10 +0100 | [diff] [blame] | 1 | /* |
| 2 | example/issues.cpp -- collection of testcases for miscellaneous issues |
| 3 | |
| 4 | Copyright (c) 2015 Wenzel Jakob <wenzel@inf.ethz.ch> |
| 5 | |
| 6 | All rights reserved. Use of this source code is governed by a |
| 7 | BSD-style license that can be found in the LICENSE file. |
| 8 | */ |
| 9 | |
| 10 | #include "example.h" |
| 11 | |
| 12 | |
| 13 | void init_issues(py::module &m) { |
| 14 | py::module m2 = m.def_submodule("issues"); |
| 15 | |
| 16 | // #137: const char* isn't handled properly |
| 17 | m2.def("print_cchar", [](const char *string) { std::cout << string << std::endl; }); |
Wenzel Jakob | d3349af | 2016-03-26 23:04:10 +0100 | [diff] [blame^] | 18 | |
| 19 | // #150: char bindings broken |
| 20 | m2.def("print_char", [](char c) { std::cout << c << std::endl; }); |
Wenzel Jakob | 17cdb06 | 2016-03-10 13:24:10 +0100 | [diff] [blame] | 21 | } |