Add test for 'natural' C++ std::string handling in C (char*).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13482 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
0e75ebbc34
commit
b0318dae69
1 changed files with 30 additions and 0 deletions
13
Examples/test-suite/c_backend_cpp_natural_std_string.i
Normal file
13
Examples/test-suite/c_backend_cpp_natural_std_string.i
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
%module c_backend_cpp_natural_std_string
|
||||
|
||||
%feature ("nspace", "1");
|
||||
|
||||
%include std_string.i
|
||||
|
||||
%inline %{
|
||||
static std::string& myStringAppend(std::string &someString, const std::string &appendedString)
|
||||
{
|
||||
someString += appendedString;
|
||||
return someString;
|
||||
}
|
||||
%}
|
||||
Loading…
Reference in a new issue