modularized logic in preceding change, fixed issue with char (fixes #150)

This commit is contained in:
Wenzel Jakob
2016-03-26 23:04:10 +01:00
parent 0772967ecf
commit d3349af48b
4 changed files with 29 additions and 17 deletions

View File

@@ -15,4 +15,7 @@ void init_issues(py::module &m) {
// #137: const char* isn't handled properly
m2.def("print_cchar", [](const char *string) { std::cout << string << std::endl; });
// #150: char bindings broken
m2.def("print_char", [](char c) { std::cout << c << std::endl; });
}

View File

@@ -3,6 +3,7 @@ from __future__ import print_function
import sys
sys.path.append('.')
from example.issues import print_cchar
from example.issues import print_cchar, print_char
print_cchar("const char *")
print_char('c')

View File

@@ -1 +1,2 @@
const char *
c