Files
cpp-thirdparty/winx64/bin/swig-3.0.12/Examples/test-suite/smart_pointer_not.i
Bassem Girgis 81b4b9e273 Initial commit
2018-12-20 17:34:07 -06:00

46 lines
613 B
OpenEdge ABL

// Test cases for classes that do *NOT* result in smart-pointer wrapping
%module smart_pointer_not
%{
#if defined(__SUNPRO_CC)
#pragma error_messages (off, arrowrtn) /* Questionable return type for ... */
#endif
%}
%inline %{
struct Foo {
int x;
int getx() { return x; }
};
class Bar {
Foo *f;
public:
Bar(Foo *f) : f(f) { }
Foo operator->() {
return *f;
}
};
class Spam {
Foo *f;
public:
Spam(Foo *f) : f(f) { }
Foo &operator->() {
return *f;
}
};
class Grok {
Foo *f;
public:
Grok(Foo *f) : f(f) { }
Foo **operator->() {
return &f;
}
};
%}