diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-12-23 20:48:20 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-12-23 21:14:10 +0400 |
commit | 3cc7978f19f55a4f3ff7209d67bbb1b0ccb7c4ff (patch) | |
tree | 25d40ca867e8420f0977e3f5a18c77c44cbd7aeb /source/blender/python/intern | |
parent | 7b97047b8ebefe877382a465a8f392cd82d4750f (diff) |
Move python threading stuff to own file in bf_python_ext
This way blender player can easily use BPY_thread_save/restore.
Not so much important for master branch, but crucial to solve
linking issues in threaded depsgraph branch.
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 9fbad956d6d..7a3d56dc56d 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -408,31 +408,6 @@ void BPY_python_reset(bContext *C) BPY_modules_load_user(C); } -/* wrapper functions related to global interpreter lock. these functions - * are slightly different from the original Python API, don't throw - * SIGABRT even if the thread state is NULL. */ - -/* analogue of PyEval_SaveThread() */ -BPy_ThreadStatePtr BPY_thread_save(void) -{ - PyThreadState *tstate = PyThreadState_Swap(NULL); - /* note: tstate can be NULL when quitting Blender */ - - if (tstate && PyEval_ThreadsInitialized()) { - PyEval_ReleaseLock(); - } - - return (BPy_ThreadStatePtr)tstate; -} - -/* analogue of PyEval_RestoreThread() */ -void BPY_thread_restore(BPy_ThreadStatePtr tstate) -{ - if (tstate) { - PyEval_RestoreThread((PyThreadState *)tstate); - } -} - static void python_script_error_jump_text(struct Text *text) { int lineno; |