%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:
William S Fulton 2005-06-23 20:46:51 +00:00
commit 81d0a6da18

View file

@ -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);