Cleanup: split BPY_extern_python into it's own header

Currently BPY_extern.h includes too much mixed functionality.
This commit is contained in:
Campbell Barton 2020-08-17 17:20:12 +10:00
parent 0b4a365183
commit f8c0d63cdb
7 changed files with 45 additions and 7 deletions

@ -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;

@ -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

@ -62,6 +62,7 @@
#endif
#include "BPY_extern.h"
#include "BPY_extern_python.h"
#include "../generic/py_capi_utils.h"

@ -122,6 +122,7 @@
#ifdef WITH_PYTHON
# include "BPY_extern.h"
# include "BPY_extern_python.h"
#endif
#include "DEG_depsgraph.h"

@ -85,6 +85,7 @@
#ifdef WITH_PYTHON
# include "BPY_extern.h"
# include "BPY_extern_python.h"
#endif
#include "GHOST_C-api.h"

@ -62,6 +62,7 @@
# ifdef WITH_PYTHON
# include "BPY_extern.h"
# include "BPY_extern_python.h"
# endif
# include "RE_engine.h"

@ -60,7 +60,7 @@
# include <signal.h>
# ifdef WITH_PYTHON
# include "BPY_extern.h" /* BPY_python_backtrace */
# include "BPY_extern_python.h" /* BPY_python_backtrace */
# endif
# include "creator_intern.h" /* own include */