Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-06-26 12:55:40 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-06-26 13:22:21 +0400
commit6135556f4556f0416f7ded737b26e342986ae1bf (patch)
tree9a9468c7770b7eb26f659bc704dc41132b305b7b /source/blender/blenkernel/BKE_main.h
parent33e8451d4b15d04872ee0923600aad0627ab040e (diff)
Replace Main->lock with an anoynous structure pointer
This way it's not needed to include BLI_threads.h from the BKE_main.h which helps avoiding adding PThreads includes to each library which uses Main on Windows. From the API point of view it's now MainLock* and to lock or unlock the main you're to use BKE_main_(un)lock(). This solves compilation error on Windows with SCons.
Diffstat (limited to 'source/blender/blenkernel/BKE_main.h')
-rw-r--r--source/blender/blenkernel/BKE_main.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h
index ade5733fa4f..82b03127237 100644
--- a/source/blender/blenkernel/BKE_main.h
+++ b/source/blender/blenkernel/BKE_main.h
@@ -41,7 +41,6 @@
*
*/
#include "DNA_listBase.h"
-#include "BLI_threads.h"
#ifdef __cplusplus
extern "C" {
@@ -49,6 +48,7 @@ extern "C" {
struct EvaluationContext;
struct Library;
+struct MainLock;
typedef struct Main {
struct Main *next, *prev;
@@ -98,7 +98,7 @@ typedef struct Main {
/* Evaluation context used by viewport */
struct EvaluationContext *eval_ctx;
- SpinLock lock;
+ struct MainLock *lock;
} Main;
#define MAIN_VERSION_ATLEAST(main, ver, subver) \