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_library.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/blenkernel/BKE_library.h') diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h index c78ea21b9dd..0372931dc49 100644 --- a/source/blender/blenkernel/BKE_library.h +++ b/source/blender/blenkernel/BKE_library.h @@ -84,6 +84,9 @@ void BKE_libblock_free_data(struct Main *bmain, struct ID *id); struct Main *BKE_main_new(void); void BKE_main_free(struct Main *mainvar); +void BKE_main_lock(struct Main *bmain); +void BKE_main_unlock(struct Main *bmain); + void BKE_main_id_tag_idcode(struct Main *mainvar, const short type, const bool tag); void BKE_main_id_tag_listbase(struct ListBase *lb, const bool tag); void BKE_main_id_tag_all(struct Main *mainvar, const bool tag); -- cgit v1.2.3