Test -flatstaticmethod and %extend
This commit is contained in:
parent
21c2e47661
commit
2c6e7f99a6
2 changed files with 11 additions and 0 deletions
|
|
@ -83,3 +83,10 @@ if A.defargs(1) != 21:
|
||||||
|
|
||||||
if A.defargs(1, 2) != 3:
|
if A.defargs(1, 2) != 3:
|
||||||
raise RuntimeError
|
raise RuntimeError
|
||||||
|
|
||||||
|
# %extend
|
||||||
|
if A_staticextended(11) != 11:
|
||||||
|
raise RuntimeError
|
||||||
|
|
||||||
|
if A.staticextended(11) != 11:
|
||||||
|
raise RuntimeError
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,10 @@
|
||||||
%typemap(in) (int c, int d) "$1 = 0; $2 = 0;";
|
%typemap(in) (int c, int d) "$1 = 0; $2 = 0;";
|
||||||
%typemap(doc,name="hello",type="Tuple") (int c, int d) "hello: int tuple[2]";
|
%typemap(doc,name="hello",type="Tuple") (int c, int d) "hello: int tuple[2]";
|
||||||
|
|
||||||
|
%extend A {
|
||||||
|
static int staticextended(int i) { return i; }
|
||||||
|
}
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
struct A {
|
struct A {
|
||||||
static int bar(int a) {
|
static int bar(int a) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue