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
|
|
@ -64,9 +64,10 @@ CPP_TEST_CASES += \
|
||||||
std_containers \
|
std_containers \
|
||||||
swigobject \
|
swigobject \
|
||||||
template_matrix \
|
template_matrix \
|
||||||
simutry \
|
simutry
|
||||||
vector
|
|
||||||
|
|
||||||
|
# li_std_carray
|
||||||
|
# director_profile
|
||||||
|
|
||||||
C_TEST_CASES += \
|
C_TEST_CASES += \
|
||||||
file_test \
|
file_test \
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from abstractbase import *
|
from python_abstractbase import *
|
||||||
from collections import *
|
from collections import *
|
||||||
assert issubclass(Mapii, MutableMapping)
|
assert issubclass(Mapii, MutableMapping)
|
||||||
assert issubclass(Multimapii, MutableMapping)
|
assert issubclass(Multimapii, MutableMapping)
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from kwargs import *
|
from python_kwargs import *
|
||||||
|
|
||||||
class MyFoo(Foo):
|
class MyFoo(Foo):
|
||||||
def __init__(self, a , b = 0):
|
def __init__(self, a , b = 0):
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import nondynamic
|
import python_nondynamic
|
||||||
|
|
||||||
aa = nondynamic.A()
|
aa = python_nondynamic.A()
|
||||||
|
|
||||||
aa.a = 1
|
aa.a = 1
|
||||||
aa.b = 2
|
aa.b = 2
|
||||||
|
|
@ -14,10 +14,10 @@ if not err:
|
||||||
raise RuntimeError, "A is not static"
|
raise RuntimeError, "A is not static"
|
||||||
|
|
||||||
|
|
||||||
class B(nondynamic.A):
|
class B(python_nondynamic.A):
|
||||||
c = 4
|
c = 4
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
nondynamic.A.__init__(self)
|
python_nondynamic.A.__init__(self)
|
||||||
pass
|
pass
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
@ -35,5 +35,5 @@ if not err:
|
||||||
raise RuntimeError, "B is not static"
|
raise RuntimeError, "B is not static"
|
||||||
|
|
||||||
|
|
||||||
cc = nondynamic.C()
|
cc = python_nondynamic.C()
|
||||||
cc.d = 3
|
cc.d = 3
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from overload_simple_cast import *
|
from python_overload_simple_cast import *
|
||||||
|
|
||||||
class Ai:
|
class Ai:
|
||||||
def __init__(self,x):
|
def __init__(self,x):
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#run:
|
#run:
|
||||||
# python pybuf_runme3.py benchmark
|
# python python_pybuf_runme3.py benchmark
|
||||||
#for the benchmark, other wise the test case will be run
|
#for the benchmark, other wise the test case will be run
|
||||||
import pybuf
|
import python_pybuf
|
||||||
import sys
|
import sys
|
||||||
if len(sys.argv)>=2 and sys.argv[1]=="benchmark":
|
if len(sys.argv)>=2 and sys.argv[1]=="benchmark":
|
||||||
#run the benchmark
|
#run the benchmark
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
import enum_tag_no_clash_with_variable
|
|
||||||
|
|
||||||
error_action = error_action
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
%module vector
|
|
||||||
%{
|
|
||||||
#include <vector>
|
|
||||||
%}
|
|
||||||
|
|
||||||
%define SWIG_STD_VECTOR_MINIMUM(CSTYPE, CTYPE...)
|
|
||||||
public:
|
|
||||||
typedef size_t size_type;
|
|
||||||
typedef CTYPE value_type;
|
|
||||||
size_type size() const;
|
|
||||||
vector();
|
|
||||||
%extend {
|
|
||||||
static std::vector<CTYPE > *Repeat(const value_type& value, int count) /*throw (std::out_of_range)*/ {
|
|
||||||
// if (count < 0)
|
|
||||||
// throw std::out_of_range("count");
|
|
||||||
return new std::vector<CTYPE >(count, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
%enddef
|
|
||||||
|
|
||||||
namespace std {
|
|
||||||
// primary (unspecialized) class template for std::vector
|
|
||||||
// does not require operator== to be defined
|
|
||||||
template<class T> class vector {
|
|
||||||
SWIG_STD_VECTOR_MINIMUM(T, T)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
%define SWIG_STD_VECTOR_SPECIALIZE(CSTYPE, CTYPE...)
|
|
||||||
namespace std {
|
|
||||||
template<> class vector<CTYPE > {
|
|
||||||
SWIG_STD_VECTOR_MINIMUM(CSTYPE, CTYPE)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
%enddef
|
|
||||||
|
|
||||||
SWIG_STD_VECTOR_SPECIALIZE(float, float)
|
|
||||||
|
|
||||||
%inline %{
|
|
||||||
typedef float Real;
|
|
||||||
%}
|
|
||||||
|
|
||||||
#if 1
|
|
||||||
//fails
|
|
||||||
namespace std {
|
|
||||||
%template(RealVector) vector<Real>;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
//works
|
|
||||||
%template(RealVector) std::vector<Real>;
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
%module abstractbase
|
%module python_abstractbase
|
||||||
%include <pyabc.i>
|
%include <pyabc.i>
|
||||||
%include <std_map.i>
|
%include <std_map.i>
|
||||||
%include <std_multimap.i>
|
%include <std_multimap.i>
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
%module(docstring="hello") autodoc
|
%module(docstring="hello") python_autodoc
|
||||||
|
|
||||||
%feature("autodoc");
|
%feature("autodoc");
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
%module kwargs
|
%module python_kwargs
|
||||||
|
|
||||||
%nocopyctor;
|
%nocopyctor;
|
||||||
%kwargs;
|
%kwargs;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
%module nondynamic
|
%module python_nondynamic
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Use the %pythonnondynamic directuve to make the wrapped class a
|
Use the %pythonnondynamic directuve to make the wrapped class a
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Simple tests of overloaded functions
|
// Simple tests of overloaded functions
|
||||||
%module("castmode") overload_simple_cast
|
%module("castmode") python_overload_simple_cast
|
||||||
|
|
||||||
%include overload_simple.i
|
%include overload_simple.i
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
%module pybuf
|
%module python_pybuf
|
||||||
%include<pybuffer.i>
|
%include<pybuffer.i>
|
||||||
%include<cstring.i>
|
%include<cstring.i>
|
||||||
/*functions for the test case*/
|
/*functions for the test case*/
|
||||||
Loading…
Add table
Add a link
Reference in a new issue