Salome HOME
updated copyright message
[modules/med.git] / src / MEDCalc / cmp / MEDPyLockWrapper.hxx
index cf231f2d68421339dce732e0ca38068a6b034c10..955130c465a98f78fd13e1e417a3186eb809db3a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2011-2016  CEA/DEN, EDF R&D
+// Copyright (C) 2011-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -33,7 +33,7 @@
  * Utility class wrapping the Python GIL acquisition. This makes use of the high level
  * API (PyGILState_Ensure and PyGILState_Release), and is hence compatible with only
  * one running Python interpreter (no call to Py_NewInterpreter()).
- * When the class is instanciated the lock is acquired. It is released at destruction time.
+ * When the class is instantiated the lock is acquired. It is released at destruction time.
  * Copy construction (and hence assignation) is forbidden.
  */
 class MEDPyLockWrapper
@@ -54,9 +54,8 @@ public:
    */
   ~MEDPyLockWrapper()
   {
-    PyThreadState* _currState = PyGILState_GetThisThreadState();
 #ifdef _DEBUG_
-    if (_currState != _state)
+    if (PyGILState_GetThisThreadState() != _state)
     {
       std::cout << "!!!!!!!!! MEDPyLockWrapper inconsistency - now entering infinite loop for debugging\n";
       while(1);