more nopgcpp tests (for const methods)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9498 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ce9db25ff0
commit
59f518a058
1 changed files with 19 additions and 1 deletions
|
|
@ -93,10 +93,12 @@ namespace NS {
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
struct Without {
|
struct Without {
|
||||||
Without(Without *p) {}
|
Without(Without *p) : var(0) {}
|
||||||
static void static_method(Without *p) {}
|
static void static_method(Without *p) {}
|
||||||
void member_method(Without *p) {}
|
void member_method(Without *p) {}
|
||||||
|
Without *var;
|
||||||
};
|
};
|
||||||
|
Without *global_without = 0;
|
||||||
void global_method_without(Without *p) {}
|
void global_method_without(Without *p) {}
|
||||||
struct With {
|
struct With {
|
||||||
With(With *p) {}
|
With(With *p) {}
|
||||||
|
|
@ -106,3 +108,19 @@ struct With {
|
||||||
void global_method_with(With *p) {}
|
void global_method_with(With *p) {}
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
%typemap(jtype, nopgcpp="1") const ConstWithout * "long";
|
||||||
|
%inline %{
|
||||||
|
class ConstWithout {
|
||||||
|
public:
|
||||||
|
ConstWithout(const ConstWithout *p) : const_var(0), var_const(0) {}
|
||||||
|
static void static_method(const ConstWithout *p) {}
|
||||||
|
void member_method(const ConstWithout *p) {}
|
||||||
|
void const_member_method(const ConstWithout *p) const {}
|
||||||
|
const ConstWithout * const_var;
|
||||||
|
const ConstWithout * const var_const;
|
||||||
|
};
|
||||||
|
const ConstWithout * global_constwithout = 0;
|
||||||
|
void global_method_constwithout(const ConstWithout *p) {}
|
||||||
|
%}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue