%extend member variable test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7315 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d1af1d070e
commit
81d0a6da18
1 changed files with 2 additions and 6 deletions
|
|
@ -6,7 +6,7 @@
|
|||
class ExtendMe {
|
||||
double var;
|
||||
public:
|
||||
ExtendMe(){}
|
||||
ExtendMe() : var(0.0) {}
|
||||
bool get(double &d) {
|
||||
d = var;
|
||||
return true;
|
||||
|
|
@ -19,14 +19,10 @@ public:
|
|||
%}
|
||||
|
||||
%extend ExtendMe {
|
||||
ExtendVar;
|
||||
double ExtendVar;
|
||||
};
|
||||
|
||||
%{
|
||||
namespace {
|
||||
static double StaticVar = 0;
|
||||
}
|
||||
|
||||
// If possible, all language modules should use this naming format for consistency
|
||||
void ExtendMe_ExtendVar_set(ExtendMe *thisptr, double value) {
|
||||
thisptr->set(value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue