← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 1723: yadeWrapper: Fix compilation with boost<1.35 (again)

 

------------------------------------------------------------
revno: 1723
committer: Václav Šmilauer <vaclav@flux>
branch nick: trunk
timestamp: Sat 2009-08-22 21:59:56 +0200
message:
  yadeWrapper: Fix compilation with boost<1.35 (again)
modified:
  py/yadeWrapper/yadeWrapper.cpp


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription.
=== modified file 'py/yadeWrapper/yadeWrapper.cpp'
--- py/yadeWrapper/yadeWrapper.cpp	2009-08-22 15:05:20 +0000
+++ py/yadeWrapper/yadeWrapper.cpp	2009-08-22 19:59:56 +0000
@@ -19,6 +19,7 @@
 #include<boost/python.hpp>
 #include<boost/foreach.hpp>
 #include<boost/algorithm/string.hpp>
+#include<boost/version.hpp>
 
 
 
@@ -71,6 +72,7 @@
 
 #include<yade/extra/boost_python_len.hpp>
 
+
 class RenderingEngine;
 
 /*!
@@ -148,7 +150,11 @@
 			#12 0x00007f0908adfb84 in OpenGLRenderingEngine::render (this=0x77f1240, rootBody=@0x1f49220, selection=-1) at pkg/common/RenderingEngine/OpenGLRenderingEngine/OpenGLRenderingEngine.cpp:232
 
 		*/
-		boost::mutex::scoped_lock lock(Omega::instance().renderMutex);
+		#if BOOST_VERSION<103500
+			boost::mutex::scoped_lock lock(Omega::instance().renderMutex,true); // acquire lock on the mutex (true)
+		#else
+			boost::mutex::scoped_lock lock(Omega::instance().renderMutex);
+		#endif
 		vector<body_id_t> ret; FOREACH(shared_ptr<Body>& b, bb){ret.push_back(insert(b));} return ret;
 	}
 	python::tuple insertClump(vector<shared_ptr<Body> > bb){/*clump: first add constitutents, then add clump, then add constitutents to the clump, then update clump props*/