modularized logic in preceding change, fixed issue with char (fixes #150)
diff --git a/example/issues.cpp b/example/issues.cpp
index e8cf831..1a4fc31 100644
--- a/example/issues.cpp
+++ b/example/issues.cpp
@@ -15,4 +15,7 @@
// #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; });
}
diff --git a/example/issues.py b/example/issues.py
index 64bd7c6..8628439 100644
--- a/example/issues.py
+++ b/example/issues.py
@@ -3,6 +3,7 @@
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')
diff --git a/example/issues.ref b/example/issues.ref
index 6f672ff..4e02121 100644
--- a/example/issues.ref
+++ b/example/issues.ref
@@ -1 +1,2 @@
const char *
+c