mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-22 22:08:37 +00:00
modularized logic in preceding change, fixed issue with char (fixes #150)
This commit is contained in:
@@ -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; });
|
||||
}
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
const char *
|
||||
c
|
||||
|
||||
Reference in New Issue
Block a user