modifying build system not to rely on the -I path to find the input files avoiding warning 125: move python .i files up one directory, some files have been renamed - prepended with python
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10953 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c3047165d6
commit
b266e1f68c
29 changed files with 19 additions and 72 deletions
|
|
@ -1,41 +0,0 @@
|
|||
%module input
|
||||
|
||||
%apply int *INPUT {int *bar};
|
||||
|
||||
%typemap(out, fragment=SWIG_From_frag(int)) int *foo {
|
||||
if ($1) {
|
||||
$result = SWIG_From(int)(*$1);
|
||||
} else {
|
||||
$result = SWIG_Py_Void();
|
||||
}
|
||||
}
|
||||
|
||||
%inline
|
||||
{
|
||||
struct Foo {
|
||||
int *foo(int *bar = 0) {
|
||||
if (bar) {
|
||||
*bar *= 2;
|
||||
}
|
||||
return (bar) ? bar : 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
%include std_string.i
|
||||
%apply std::string *INPUT {std::string *bar};
|
||||
|
||||
%typemap(out, fragment=SWIG_From_frag(std::string)) std::string *sfoo {
|
||||
if ($1) {
|
||||
$result = SWIG_From(std::string)(*$1);
|
||||
} else {
|
||||
$result = SWIG_Py_Void();
|
||||
}
|
||||
}
|
||||
|
||||
%inline %{
|
||||
std::string *sfoo(std::string *bar = 0) {
|
||||
if (bar) *bar += " world";
|
||||
return (bar) ? bar : 0;
|
||||
}
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue