reenable missing INPUT/OUTPUT, and add tests for std::string
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8637 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c661fae1e7
commit
19ce5762f0
7 changed files with 38 additions and 11 deletions
|
|
@ -1,5 +1,11 @@
|
|||
%module li_std_string
|
||||
%include "std_string.i"
|
||||
%include <std_string.i>
|
||||
|
||||
#if defined(SWIGUTL)
|
||||
%apply std::string& INPUT { std::string &input }
|
||||
%apply std::string& INOUT { std::string &inout }
|
||||
#endif
|
||||
|
||||
|
||||
%inline %{
|
||||
|
||||
|
|
@ -35,6 +41,14 @@ std::string& test_reference_out() {
|
|||
return x;
|
||||
}
|
||||
|
||||
std::string test_reference_input(std::string &input) {
|
||||
return input;
|
||||
}
|
||||
|
||||
void test_reference_inout(std::string &inout) {
|
||||
inout += inout;
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue