← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 1959: Fix bug 505783

 

------------------------------------------------------------
revno: 1959
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: trunk
timestamp: Mon 2010-01-11 19:16:00 +0100
message:
  Fix bug 505783
modified:
  lib/pyutil/gil.cpp
  lib/pyutil/gil.hpp


--
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 'lib/pyutil/gil.cpp'
--- lib/pyutil/gil.cpp	2010-01-11 14:47:47 +0000
+++ lib/pyutil/gil.cpp	2010-01-11 18:16:00 +0000
@@ -1,6 +1,5 @@
 #include<yade/lib-pyutil/gil.hpp>
 void pyRunString(const std::string& cmd){
-	//gilLock lock; 
-	PyRun_SimpleString(cmd.c_str());
+	gilLock lock; PyRun_SimpleString(cmd.c_str());
 };
 

=== modified file 'lib/pyutil/gil.hpp'
--- lib/pyutil/gil.hpp	2010-01-11 14:47:47 +0000
+++ lib/pyutil/gil.hpp	2010-01-11 18:16:00 +0000
@@ -1,15 +1,13 @@
 // 2009 © Václav Šmilauer <eudoxos@xxxxxxxx>
-
+#pragma once
 #include<Python.h>
 //! class (scoped lock) managing python's Global Interpreter Lock (gil)
-/*
 class gilLock{
 	PyGILState_STATE state;
 	public:
 		gilLock(){ state=PyGILState_Ensure(); }
 		~gilLock(){ PyGILState_Release(state); }
 };
-*/
 //! run string as python command; locks & unlocks GIL automatically
 void pyRunString(const std::string& cmd);