Commit 2547ca46 authored by Felipe Lema's avatar Felipe Lema Committed by Wenzel Jakob
Browse files

deal with Python versions compiled without thread support (fixes #81)

parent 15f6a003
......@@ -983,6 +983,7 @@ template <typename InputType, typename OutputType> void implicitly_convertible()
((detail::type_info *) it->second)->implicit_conversions.push_back(implicit_caster);
}
#if defined(WITH_THREAD)
inline void init_threading() { PyEval_InitThreads(); }
class gil_scoped_acquire {
......@@ -998,6 +999,7 @@ public:
inline gil_scoped_release() { state = PyEval_SaveThread(); }
inline ~gil_scoped_release() { PyEval_RestoreThread(state); }
};
#endif
inline function get_overload(const void *this_ptr, const char *name) {
handle py_object = detail::get_object_handle(this_ptr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment