Merge pull request #165 from hfalcic/master

Python 3 byte string output: use errors="surrogateescape"
This commit is contained in:
William S Fulton 2014-05-24 17:54:55 +01:00
commit d1f95ab6fd
5 changed files with 111 additions and 0 deletions

View file

@ -473,6 +473,7 @@ CPP_TEST_CASES += \
typemap_various \
typename \
types_directive \
unicode_strings \
union_scope \
using1 \
using2 \

View file

@ -0,0 +1,4 @@
import unicode_strings
unicode_strings.test_c_str()
unicode_strings.test_std_string()

View file

@ -0,0 +1,15 @@
%module unicode_strings
%include <std_string.i>
%inline %{
const char* test_c_str(void) {
return "h\xe9llo";
}
std::string test_std_string(void) {
return std::string("h\xe9llo");
}
%}