renamed lib_xxxx to li_xxxx
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6598 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d035ab0fa3
commit
9af665a99a
6 changed files with 6 additions and 6 deletions
82
SWIG/Examples/test-suite/python/li_std_wstring.i
Normal file
82
SWIG/Examples/test-suite/python/li_std_wstring.i
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
%module li_std_wstring
|
||||
%include <std_basic_string.i>
|
||||
%include <std_wstring.i>
|
||||
|
||||
|
||||
%template(wstring) std::basic_string<wchar_t>;
|
||||
%inline %{
|
||||
|
||||
struct A : std::wstring
|
||||
{
|
||||
A(const std::wstring& s) : std::wstring(s)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
struct B
|
||||
{
|
||||
B(const std::wstring& s) : cname(0), name(s), a(s)
|
||||
{
|
||||
}
|
||||
|
||||
char *cname;
|
||||
std::wstring name;
|
||||
A a;
|
||||
|
||||
};
|
||||
|
||||
|
||||
wchar_t test_wcvalue(wchar_t x) {
|
||||
return x;
|
||||
}
|
||||
|
||||
const wchar_t* test_ccvalue(const wchar_t* x) {
|
||||
return x;
|
||||
}
|
||||
|
||||
wchar_t* test_cvalue(wchar_t* x) {
|
||||
return x;
|
||||
}
|
||||
|
||||
|
||||
std::wstring test_value(std::wstring x) {
|
||||
return x;
|
||||
}
|
||||
|
||||
const std::wstring& test_const_reference(const std::wstring &x) {
|
||||
return x;
|
||||
}
|
||||
|
||||
void test_pointer(std::wstring *x) {
|
||||
}
|
||||
|
||||
std::wstring *test_pointer_out() {
|
||||
static std::wstring x = L"x";
|
||||
return &x;
|
||||
}
|
||||
|
||||
void test_const_pointer(const std::wstring *x) {
|
||||
}
|
||||
|
||||
const std::wstring *test_const_pointer_out() {
|
||||
static std::wstring x = L"x";
|
||||
return &x;
|
||||
}
|
||||
|
||||
void test_reference(std::wstring &x) {
|
||||
}
|
||||
|
||||
std::wstring& test_reference_out() {
|
||||
static std::wstring x = L"x";
|
||||
return x;
|
||||
}
|
||||
|
||||
void test_throw() throw(std::wstring){
|
||||
static std::wstring x = L"x";
|
||||
|
||||
throw x;
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue