diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-08-17 10:20:12 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-08-17 10:20:12 +0300 |
commit | f8c0d63cdb3df8bbce3cd28236ab4a283d6ae7a0 (patch) | |
tree | 69907b8e57c47a52871df09c6d3225a6bd2a821f /source/blender/python | |
parent | 0b4a365183c3d740356f8f5f6a9b3ce542480bb2 (diff) |
Cleanup: split BPY_extern_python into it's own header
Currently BPY_extern.h includes too much mixed functionality.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/BPY_extern.h | 6 | ||||
-rw-r--r-- | source/blender/python/BPY_extern_python.h | 40 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 1 |
3 files changed, 41 insertions, 6 deletions
diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h index 7bcf96116b9..3fc4df270d5 100644 --- a/source/blender/python/BPY_extern.h +++ b/source/blender/python/BPY_extern.h @@ -50,12 +50,6 @@ void BPY_pyconstraint_update(struct Object *owner, struct bConstraint *con); int BPY_is_pyconstraint(struct Text *text); // void BPY_free_pyconstraint_links(struct Text *text); -void BPY_python_start(int argc, const char **argv); -void BPY_python_end(void); -void BPY_python_reset(struct bContext *C); -void BPY_python_use_system_env(void); -void BPY_python_backtrace(/* FILE */ void *file); - /* global interpreter lock */ typedef void *BPy_ThreadStatePtr; diff --git a/source/blender/python/BPY_extern_python.h b/source/blender/python/BPY_extern_python.h new file mode 100644 index 00000000000..d6033f86d37 --- /dev/null +++ b/source/blender/python/BPY_extern_python.h @@ -0,0 +1,40 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** \file + * \ingroup python + * + * Functionality relating to Python setup & tear down. + */ + +#pragma once + +struct bContext; + +#ifdef __cplusplus +extern "C" { +#endif + +/* bpy_interface.c */ +void BPY_python_start(int argc, const char **argv); +void BPY_python_end(void); +void BPY_python_reset(struct bContext *C); +void BPY_python_use_system_env(void); +void BPY_python_backtrace(/* FILE */ void *file); + +#ifdef __cplusplus +} /* extern "C" */ +#endif diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index c311041e4cb..098f6202d9b 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -62,6 +62,7 @@ #endif #include "BPY_extern.h" +#include "BPY_extern_python.h" #include "../generic/py_capi_utils.h" |