blob: e7266266e70451110e3b39cc4a60399db6d09ff6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
%module unicode_strings
%include <std_string.i>
%begin %{
#define SWIG_PYTHON_2_UNICODE
%}
%inline %{
const char* non_utf8_c_str(void) {
return "h\xe9llo w\xc3\xb6rld";
}
std::string non_utf8_std_string(void) {
return std::string("h\xe9llo w\xc3\xb6rld");
}
char *charstring(char *s) {
return s;
}
void instring(const char *s) {
}
%}
|