Revision: 569
http://svn.sourceforge.net/pygccxml/?rev=569&view=rev
Author: mbaas
Date: 2006-09-21 02:48:15 -0700 (Thu, 21 Sep 2006)
Log Message:
-----------
Renamed the module from gil_state to gil_guard.
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/code_repository/__init__.py
Added Paths:
-----------
pyplusplus_dev/pyplusplus/code_repository/gil_guard.py
Removed Paths:
-------------
pyplusplus_dev/pyplusplus/code_repository/gil_state.py
Modified: pyplusplus_dev/pyplusplus/code_repository/__init__.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_repository/__init__.py 2006-09-21 09:47:12 UTC (rev 568)
+++ pyplusplus_dev/pyplusplus/code_repository/__init__.py 2006-09-21 09:48:15 UTC (rev 569)
@@ -14,6 +14,6 @@
"""
import array_1
-import gil_state
+import gil_guard
-all = [ array_1, gil_state ]
+all = [ array_1, gil_guard ]
Copied: pyplusplus_dev/pyplusplus/code_repository/gil_guard.py (from rev 568, pyplusplus_dev/pyplusplus/code_repository/gil_state.py)
===================================================================
--- pyplusplus_dev/pyplusplus/code_repository/gil_guard.py (rev 0)
+++ pyplusplus_dev/pyplusplus/code_repository/gil_guard.py 2006-09-21 09:48:15 UTC (rev 569)
@@ -0,0 +1,62 @@
+# Copyright 2004 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""
+This file contains C++ code to acquire/release the GIL.
+"""
+
+file_name = "__gil_guard.pypp.hpp"
+
+code = \
+"""// Copyright 2004 Roman Yakovenko.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef __gil_guard_pyplusplus_hpp__
+#define __gil_guard_pyplusplus_hpp__
+
+namespace pyplusplus{ namespace threading {
+
+class gil_guard_t
+{
+ public:
+ gil_guard_t( bool lock=false )
+ : m_locked( false )
+ {
+ if( lock )
+ ensure();
+ }
+
+ ~gil_guard_t() {
+ release();
+ }
+
+ void ensure() {
+ if( !m_locked )
+ {
+ m_gstate = PyGILState_Ensure();
+ m_locked = true;
+ }
+ }
+
+ void release() {
+ if( m_locked )
+ {
+ PyGILState_Release(m_gstate);
+ m_locked = false;
+ }
+ }
+
+ private:
+ bool m_locked;
+ PyGILState_STATE m_gstate;
+};
+
+} /* threading */ } /* pyplusplus*/
+
+
+#endif//__gil_guard_pyplusplus_hpp__
+"""
Deleted: pyplusplus_dev/pyplusplus/code_repository/gil_state.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_repository/gil_state.py 2006-09-21 09:47:12 UTC (rev 568)
+++ pyplusplus_dev/pyplusplus/code_repository/gil_state.py 2006-09-21 09:48:15 UTC (rev 569)
@@ -1,62 +0,0 @@
-# Copyright 2004 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-This file contains C++ code to acquire/release the GIL.
-"""
-
-file_name = "__gil_guard.pypp.hpp"
-
-code = \
-"""// Copyright 2004 Roman Yakovenko.
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef __gil_guard_pyplusplus_hpp__
-#define __gil_guard_pyplusplus_hpp__
-
-namespace pyplusplus{ namespace threading {
-
-class gil_guard_t
-{
- public:
- gil_guard_t( bool lock=false )
- : m_locked( false )
- {
- if( lock )
- ensure();
- }
-
- ~gil_guard_t() {
- release();
- }
-
- void ensure() {
- if( !m_locked )
- {
- m_gstate = PyGILState_Ensure();
- m_locked = true;
- }
- }
-
- void release() {
- if( m_locked )
- {
- PyGILState_Release(m_gstate);
- m_locked = false;
- }
- }
-
- private:
- bool m_locked;
- PyGILState_STATE m_gstate;
-};
-
-} /* threading */ } /* pyplusplus*/
-
-
-#endif//__gil_guard_pyplusplus_hpp__
-"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|