From 6135556f4556f0416f7ded737b26e342986ae1bf Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 26 Jun 2014 14:55:40 +0600 Subject: 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. --- source/blender/blenkernel/BKE_main.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/BKE_main.h') 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) \ -- cgit v1.2.3