From 16ffea1d11963843531167d6e6a9dfe4ffebce8c Mon Sep 17 00:00:00 2001
From: Jonathan Lambrechts <jonathan.lambrechts@uclouvain.be>
Date: Wed, 13 Jan 2010 21:21:11 +0000
Subject: [PATCH] cast in bindings for MVertex::x,y,z

---
 Geo/MVertex.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Geo/MVertex.cpp b/Geo/MVertex.cpp
index 3918196fa7..0f56dfdd79 100644
--- a/Geo/MVertex.cpp
+++ b/Geo/MVertex.cpp
@@ -405,8 +405,10 @@ void MVertex::registerBindings(binding *b)
   classBinding *cb = b->addClass<MVertex>("MVertex");
   methodBinding *cm;
   cm = cb->addMethod("getNum",&MVertex::getNum);
-  //  cm = cb->addMethod("x",&MVertex::x);
-  //  cm = cb->addMethod("y",&MVertex::y);
-  //  cm = cb->addMethod("z",&MVertex::z);
+  // here we specify the cast because there are 2 MVertex::x function
+  cm = cb->addMethod("x", (double (MVertex::*)() const) &MVertex::x);
+  cm = cb->addMethod("x2", (double& (MVertex::*)()) &MVertex::x);
+  cm = cb->addMethod("y", (double (MVertex::*)() const) &MVertex::y);
+  cm = cb->addMethod("z", (double (MVertex::*)() const) &MVertex::z);
   cm = cb->setConstructor<MVertex,double,double,double>();
 }
-- 
GitLab