forked from bartvdbraak/blender
Cleanup: update clang-format so PyObject_HEAD indents properly
This commit is contained in:
parent
1f778dbefc
commit
6570159929
@ -265,4 +265,5 @@ ForEachMacros:
|
||||
- VECTOR_SET_SLOT_PROBING_BEGIN
|
||||
|
||||
StatementMacros:
|
||||
- PyObject_HEAD
|
||||
- PyObject_VAR_HEAD
|
||||
|
@ -39,7 +39,8 @@ extern PyTypeObject BBox_Type;
|
||||
|
||||
/*---------------------------Python BPy_BBox structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD Freestyle::BBox<Freestyle::Geometry::Vec3r> *bb;
|
||||
PyObject_HEAD
|
||||
Freestyle::BBox<Freestyle::Geometry::Vec3r> *bb;
|
||||
} BPy_BBox;
|
||||
|
||||
/*---------------------------Python BPy_BBox visible prototypes-----------*/
|
||||
|
@ -39,7 +39,8 @@ extern PyTypeObject BinaryPredicate0D_Type;
|
||||
|
||||
/*---------------------------Python BPy_BinaryPredicate0D structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD Freestyle::BinaryPredicate0D *bp0D;
|
||||
PyObject_HEAD
|
||||
Freestyle::BinaryPredicate0D *bp0D;
|
||||
} BPy_BinaryPredicate0D;
|
||||
|
||||
/*---------------------------Python BPy_BinaryPredicate0D visible prototypes-----------*/
|
||||
|
@ -39,7 +39,8 @@ extern PyTypeObject BinaryPredicate1D_Type;
|
||||
|
||||
/*---------------------------Python BPy_BinaryPredicate1D structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD Freestyle::BinaryPredicate1D *bp1D;
|
||||
PyObject_HEAD
|
||||
Freestyle::BinaryPredicate1D *bp1D;
|
||||
} BPy_BinaryPredicate1D;
|
||||
|
||||
/*---------------------------Python BPy_BinaryPredicate1D visible prototypes-----------*/
|
||||
|
@ -39,7 +39,8 @@ extern PyTypeObject FrsMaterial_Type;
|
||||
|
||||
/*---------------------------Python BPy_FrsMaterial structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD Freestyle::FrsMaterial *m;
|
||||
PyObject_HEAD
|
||||
Freestyle::FrsMaterial *m;
|
||||
} BPy_FrsMaterial;
|
||||
|
||||
/*---------------------------Python BPy_FrsMaterial visible prototypes-----------*/
|
||||
|
@ -39,7 +39,8 @@ extern PyTypeObject FrsNoise_Type;
|
||||
|
||||
/*---------------------------Python BPy_FrsNoise structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD Freestyle::Noise *n;
|
||||
PyObject_HEAD
|
||||
Freestyle::Noise *n;
|
||||
Freestyle::PseudoNoise *pn;
|
||||
} BPy_FrsNoise;
|
||||
|
||||
|
@ -40,7 +40,8 @@ extern PyTypeObject Id_Type;
|
||||
|
||||
/*---------------------------Python BPy_Id structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD Freestyle::Id *id;
|
||||
PyObject_HEAD
|
||||
Freestyle::Id *id;
|
||||
} BPy_Id;
|
||||
|
||||
/*---------------------------Python BPy_Id visible prototypes-----------*/
|
||||
|
@ -39,7 +39,8 @@ extern PyTypeObject Interface0D_Type;
|
||||
|
||||
/*---------------------------Python BPy_Interface0D structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD Freestyle::Interface0D *if0D;
|
||||
PyObject_HEAD
|
||||
Freestyle::Interface0D *if0D;
|
||||
bool borrowed; /* true if *if0D is a borrowed object */
|
||||
} BPy_Interface0D;
|
||||
|
||||
|
@ -39,7 +39,8 @@ extern PyTypeObject Interface1D_Type;
|
||||
|
||||
/*---------------------------Python BPy_Interface1D structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD Freestyle::Interface1D *if1D;
|
||||
PyObject_HEAD
|
||||
Freestyle::Interface1D *if1D;
|
||||
bool borrowed; /* true if *if1D is a borrowed object */
|
||||
} BPy_Interface1D;
|
||||
|
||||
|
@ -38,7 +38,8 @@ extern PyTypeObject Iterator_Type;
|
||||
|
||||
/*---------------------------Python BPy_Iterator structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD Freestyle::Iterator *it;
|
||||
PyObject_HEAD
|
||||
Freestyle::Iterator *it;
|
||||
} BPy_Iterator;
|
||||
|
||||
/*---------------------------Python BPy_Iterator visible prototypes-----------*/
|
||||
|
@ -38,7 +38,8 @@ extern PyTypeObject SShape_Type;
|
||||
|
||||
/*---------------------------Python BPy_SShape structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD Freestyle::SShape *ss;
|
||||
PyObject_HEAD
|
||||
Freestyle::SShape *ss;
|
||||
bool borrowed; /* true if *ss is a borrowed object */
|
||||
} BPy_SShape;
|
||||
|
||||
|
@ -39,7 +39,8 @@ extern PyTypeObject StrokeAttribute_Type;
|
||||
|
||||
/*---------------------------Python BPy_StrokeAttribute structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD Freestyle::StrokeAttribute *sa;
|
||||
PyObject_HEAD
|
||||
Freestyle::StrokeAttribute *sa;
|
||||
bool borrowed; /* true if *sa is a borrowed reference */
|
||||
} BPy_StrokeAttribute;
|
||||
|
||||
|
@ -41,7 +41,8 @@ extern PyTypeObject StrokeShader_Type;
|
||||
|
||||
/*---------------------------Python BPy_StrokeShader structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD Freestyle::StrokeShader *ss;
|
||||
PyObject_HEAD
|
||||
Freestyle::StrokeShader *ss;
|
||||
} BPy_StrokeShader;
|
||||
|
||||
/*---------------------------Python BPy_StrokeShader visible prototypes-----------*/
|
||||
|
@ -39,7 +39,8 @@ extern PyTypeObject UnaryFunction0D_Type;
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction0D structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD PyObject *py_uf0D;
|
||||
PyObject_HEAD
|
||||
PyObject *py_uf0D;
|
||||
} BPy_UnaryFunction0D;
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction0D visible prototypes-----------*/
|
||||
|
@ -39,7 +39,8 @@ extern PyTypeObject UnaryFunction1D_Type;
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction1D structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD PyObject *py_uf1D;
|
||||
PyObject_HEAD
|
||||
PyObject *py_uf1D;
|
||||
} BPy_UnaryFunction1D;
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction1D visible prototypes-----------*/
|
||||
|
@ -39,7 +39,8 @@ extern PyTypeObject UnaryPredicate0D_Type;
|
||||
|
||||
/*---------------------------Python BPy_UnaryPredicate0D structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD Freestyle::UnaryPredicate0D *up0D;
|
||||
PyObject_HEAD
|
||||
Freestyle::UnaryPredicate0D *up0D;
|
||||
} BPy_UnaryPredicate0D;
|
||||
|
||||
/*---------------------------Python BPy_UnaryPredicate0D visible prototypes-----------*/
|
||||
|
@ -39,7 +39,8 @@ extern PyTypeObject UnaryPredicate1D_Type;
|
||||
|
||||
/*---------------------------Python BPy_UnaryPredicate1D structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD Freestyle::UnaryPredicate1D *up1D;
|
||||
PyObject_HEAD
|
||||
Freestyle::UnaryPredicate1D *up1D;
|
||||
} BPy_UnaryPredicate1D;
|
||||
|
||||
/*---------------------------Python BPy_UnaryPredicate1D visible prototypes-----------*/
|
||||
|
@ -38,7 +38,8 @@ extern PyTypeObject ViewMap_Type;
|
||||
|
||||
/*---------------------------Python BPy_ViewMap structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD Freestyle::ViewMap *vm;
|
||||
PyObject_HEAD
|
||||
Freestyle::ViewMap *vm;
|
||||
} BPy_ViewMap;
|
||||
|
||||
/*---------------------------Python BPy_ViewMap visible prototypes-----------*/
|
||||
|
@ -40,7 +40,8 @@ extern PyTypeObject ViewShape_Type;
|
||||
|
||||
/*---------------------------Python BPy_ViewShape structure definition----------*/
|
||||
typedef struct {
|
||||
PyObject_HEAD Freestyle::ViewShape *vs;
|
||||
PyObject_HEAD
|
||||
Freestyle::ViewShape *vs;
|
||||
bool borrowed; /* true if *vs a borrowed object */
|
||||
BPy_SShape *py_ss;
|
||||
} BPy_ViewShape;
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD /* Required Python macro. */
|
||||
const char *opname;
|
||||
const char *opname;
|
||||
} BPy_BMeshOpFunc;
|
||||
|
||||
PyObject *BPy_BMO_call(BPy_BMeshOpFunc *self, PyObject *args, PyObject *kw);
|
||||
|
@ -131,7 +131,7 @@ static bool pygpu_framebuffer_stack_pop_and_restore_or_error(GPUFrameBuffer *fb)
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD /* Required Python macro. */
|
||||
BPyGPUFrameBuffer *py_fb;
|
||||
BPyGPUFrameBuffer *py_fb;
|
||||
int level;
|
||||
} PyFrameBufferStackContext;
|
||||
|
||||
|
@ -27,7 +27,8 @@ extern PyTypeObject BPyGPUFrameBuffer_Type;
|
||||
#define BPyGPUFrameBuffer_Check(v) (Py_TYPE(v) == &BPyGPUFrameBuffer_Type)
|
||||
|
||||
typedef struct BPyGPUFrameBuffer {
|
||||
PyObject_HEAD struct GPUFrameBuffer *fb;
|
||||
PyObject_HEAD
|
||||
struct GPUFrameBuffer *fb;
|
||||
|
||||
#ifndef GPU_NO_USE_PY_REFERENCES
|
||||
bool shared_reference;
|
||||
|
@ -153,7 +153,7 @@ static PyObject *pygpu_matrix_pop_projection(PyObject *UNUSED(self))
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD /* Required Python macro. */
|
||||
int type;
|
||||
int type;
|
||||
int level;
|
||||
} BPyGPU_MatrixStackContext;
|
||||
|
||||
|
@ -98,7 +98,7 @@ static int pygpu_offscreen_valid_check(BPyGPUOffScreen *py_ofs)
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD /* Required Python macro. */
|
||||
BPyGPUOffScreen *py_offscreen;
|
||||
BPyGPUOffScreen *py_offscreen;
|
||||
int level;
|
||||
bool is_explicitly_bound; /* Bound by "bind" method. */
|
||||
} OffScreenStackContext;
|
||||
|
@ -27,7 +27,8 @@ extern PyTypeObject BPyGPUOffScreen_Type;
|
||||
#define BPyGPUOffScreen_Check(v) (Py_TYPE(v) == &BPyGPUOffScreen_Type)
|
||||
|
||||
typedef struct BPyGPUOffScreen {
|
||||
PyObject_HEAD struct GPUOffScreen *ofs;
|
||||
PyObject_HEAD
|
||||
struct GPUOffScreen *ofs;
|
||||
} BPyGPUOffScreen;
|
||||
|
||||
PyObject *BPyGPUOffScreen_CreatePyObject(struct GPUOffScreen *ofs) ATTR_NONNULL(1);
|
||||
|
@ -27,7 +27,8 @@ extern PyTypeObject BPyGPUTexture_Type;
|
||||
#define BPyGPUTexture_Check(v) (Py_TYPE(v) == &BPyGPUTexture_Type)
|
||||
|
||||
typedef struct BPyGPUTexture {
|
||||
PyObject_HEAD struct GPUTexture *tex;
|
||||
PyObject_HEAD
|
||||
struct GPUTexture *tex;
|
||||
} BPyGPUTexture;
|
||||
|
||||
int bpygpu_ParseTexture(PyObject *o, void *p);
|
||||
|
@ -27,7 +27,8 @@ extern PyTypeObject BPyGPUUniformBuf_Type;
|
||||
#define BPyGPUUniformBuf_Check(v) (Py_TYPE(v) == &BPyGPUUniformBuf_Type)
|
||||
|
||||
typedef struct BPyGPUUniformBuf {
|
||||
PyObject_HEAD struct GPUUniformBuf *ubo;
|
||||
PyObject_HEAD
|
||||
struct GPUUniformBuf *ubo;
|
||||
} BPyGPUUniformBuf;
|
||||
|
||||
PyObject *BPyGPUUniformBuf_CreatePyObject(struct GPUUniformBuf *ubo) ATTR_NONNULL(1);
|
||||
|
@ -51,8 +51,8 @@
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
/** The string used to separate context from actual message in PY_TRANSLATE RNA props. */
|
||||
const char *context_separator;
|
||||
/** The string used to separate context from actual message in PY_TRANSLATE RNA props. */
|
||||
const char *context_separator;
|
||||
/** A "named tuple" (StructSequence actually...) containing all C-defined contexts. */
|
||||
PyObject *contexts;
|
||||
/** A readonly mapping {C context id: python id} (actually, a MappingProxy). */
|
||||
|
@ -785,8 +785,8 @@ static struct PyModuleDef bpy_proxy_def = {
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
/* Type-specific fields go here. */
|
||||
PyObject *mod;
|
||||
/* Type-specific fields go here. */
|
||||
PyObject *mod;
|
||||
} dealloc_obj;
|
||||
|
||||
/* call once __file__ is set */
|
||||
|
@ -74,7 +74,8 @@ static void bpy_text_filename_get(char *fn, const Main *bmain, size_t fn_len, co
|
||||
/* bad!, we should never do this, but currently only safe way I could find to keep namespace.
|
||||
* from being cleared. - campbell */
|
||||
typedef struct {
|
||||
PyObject_HEAD PyObject *md_dict;
|
||||
PyObject_HEAD
|
||||
PyObject *md_dict;
|
||||
/* omit other values, we only want the dict. */
|
||||
} PyModuleObject;
|
||||
#endif
|
||||
|
@ -62,8 +62,8 @@
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD /* Required Python macro. */
|
||||
/* Collection iterator specific parts. */
|
||||
char relpath[FILE_MAX];
|
||||
/* Collection iterator specific parts. */
|
||||
char relpath[FILE_MAX];
|
||||
char abspath[FILE_MAX]; /* absolute path */
|
||||
BlendHandle *blo_handle;
|
||||
int flag;
|
||||
|
@ -33,8 +33,8 @@ StructRNA *pointer_type_from_py(PyObject *value, const char *error_prefix);
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
/* This isn't GC tracked, it's a function from `bpy.props` so it's not going away. */
|
||||
void *fn;
|
||||
/* This isn't GC tracked, it's a function from `bpy.props` so it's not going away. */
|
||||
void *fn;
|
||||
PyObject *kw;
|
||||
} BPy_PropDeferred;
|
||||
|
||||
|
@ -112,7 +112,7 @@ extern PyTypeObject pyrna_func_Type;
|
||||
typedef struct {
|
||||
PyObject_HEAD /* Required Python macro. */
|
||||
#ifdef USE_WEAKREFS
|
||||
PyObject *in_weakreflist;
|
||||
PyObject *in_weakreflist;
|
||||
#endif
|
||||
PointerRNA ptr;
|
||||
} BPy_DummyPointerRNA;
|
||||
@ -120,7 +120,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
PyObject_HEAD /* Required Python macro. */
|
||||
#ifdef USE_WEAKREFS
|
||||
PyObject *in_weakreflist;
|
||||
PyObject *in_weakreflist;
|
||||
#endif
|
||||
PointerRNA ptr;
|
||||
#ifdef USE_PYRNA_STRUCT_REFERENCE
|
||||
@ -137,7 +137,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
PyObject_HEAD /* Required Python macro. */
|
||||
#ifdef USE_WEAKREFS
|
||||
PyObject *in_weakreflist;
|
||||
PyObject *in_weakreflist;
|
||||
#endif
|
||||
PointerRNA ptr;
|
||||
PropertyRNA *prop;
|
||||
@ -146,7 +146,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
PyObject_HEAD /* Required Python macro. */
|
||||
#ifdef USE_WEAKREFS
|
||||
PyObject *in_weakreflist;
|
||||
PyObject *in_weakreflist;
|
||||
#endif
|
||||
PointerRNA ptr;
|
||||
PropertyRNA *prop;
|
||||
@ -161,7 +161,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
PyObject_HEAD /* Required Python macro. */
|
||||
#ifdef USE_WEAKREFS
|
||||
PyObject *in_weakreflist;
|
||||
PyObject *in_weakreflist;
|
||||
#endif
|
||||
|
||||
/* collection iterator specific parts */
|
||||
@ -171,7 +171,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
PyObject_HEAD /* Required Python macro. */
|
||||
#ifdef USE_WEAKREFS
|
||||
PyObject *in_weakreflist;
|
||||
PyObject *in_weakreflist;
|
||||
#endif
|
||||
PointerRNA ptr;
|
||||
FunctionRNA *func;
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD /* Required Python macro. */
|
||||
BPy_StructRNA *data_rna;
|
||||
BPy_StructRNA *data_rna;
|
||||
char filepath[1024];
|
||||
} BPy_DataContext;
|
||||
|
||||
|
@ -3479,7 +3479,7 @@ int Matrix_Parse4x4(PyObject *o, void *p)
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD /* Required Python macro. */
|
||||
MatrixObject *matrix_user;
|
||||
MatrixObject *matrix_user;
|
||||
eMatrixAccess_t type;
|
||||
} MatrixAccessObject;
|
||||
|
||||
|
@ -93,7 +93,8 @@ static const char PY_BVH_TREE_TYPE_DEFAULT = 4;
|
||||
static const char PY_BVH_AXIS_DEFAULT = 6;
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD BVHTree *tree;
|
||||
PyObject_HEAD
|
||||
BVHTree *tree;
|
||||
float epsilon;
|
||||
|
||||
float (*coords)[3];
|
||||
|
@ -37,7 +37,8 @@
|
||||
#include "BLI_strict_flags.h"
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD KDTree_3d *obj;
|
||||
PyObject_HEAD
|
||||
KDTree_3d *obj;
|
||||
uint maxsize;
|
||||
uint count;
|
||||
uint count_balance; /* size when we last balanced */
|
||||
|
Loading…
Reference in New Issue
Block a user