mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Move docstring check from fatal-onstart-hack to unit test run by CI
This commit is contained in:
@@ -58,6 +58,10 @@ PyTypeObject **SbkPySide2_QtWidgetsTypes = NULL;
|
||||
#include "Code/QRDUtils.h"
|
||||
#include "PythonContext.h"
|
||||
|
||||
// exported by generated files, used to check docstrings in interfaces
|
||||
bool CheckCoreDocstrings();
|
||||
bool CheckQtDocstrings();
|
||||
|
||||
// defined in SWIG-generated renderdoc_python.cpp
|
||||
extern "C" PyObject *PyInit__renderdoc(void);
|
||||
extern "C" PyObject *PassObjectToPython(const char *type, void *obj);
|
||||
@@ -443,6 +447,18 @@ PythonContext::~PythonContext()
|
||||
outputTick();
|
||||
}
|
||||
|
||||
bool PythonContext::CheckDocstrings()
|
||||
{
|
||||
bool errors = false;
|
||||
|
||||
PyGILState_STATE gil = PyGILState_Ensure();
|
||||
errors |= CheckCoreDocstrings();
|
||||
errors |= CheckQtDocstrings();
|
||||
PyGILState_Release(gil);
|
||||
|
||||
return errors;
|
||||
}
|
||||
|
||||
void PythonContext::Finish()
|
||||
{
|
||||
PyGILState_STATE gil = PyGILState_Ensure();
|
||||
|
||||
Reference in New Issue
Block a user