1 %module li_std_wstring_inherit 2 %include <std_basic_string.i> 3 %include <std_wstring.i> 4 5 6 %inline %{ 7 8 struct A : std::wstring 9 { AA10 A(const std::wstring& s) : std::wstring(s) 11 { 12 } 13 }; 14 15 struct B 16 { BB17 B(const std::wstring& s) : cname(0), name(s), a(s) 18 { 19 } 20 21 char *cname; 22 std::wstring name; 23 A a; 24 25 }; 26 test_value(std::wstring x)27std::wstring test_value(std::wstring x) { 28 return x; 29 } 30 31 #ifdef SWIGPYTHON_BUILTIN is_python_builtin()32bool is_python_builtin() { return true; } 33 #else is_python_builtin()34bool is_python_builtin() { return false; } 35 #endif 36 37 %} 38 39 40