From 65701599290292a0e57c005f45c7dfa0c3333177 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 24 Jun 2021 17:10:22 +1000 Subject: Cleanup: update clang-format so PyObject_HEAD indents properly --- source/blender/python/bmesh/bmesh_py_ops_call.h | 2 +- source/blender/python/gpu/gpu_py_framebuffer.c | 2 +- source/blender/python/gpu/gpu_py_framebuffer.h | 3 ++- source/blender/python/gpu/gpu_py_matrix.c | 2 +- source/blender/python/gpu/gpu_py_offscreen.c | 2 +- source/blender/python/gpu/gpu_py_offscreen.h | 3 ++- source/blender/python/gpu/gpu_py_texture.h | 3 ++- source/blender/python/gpu/gpu_py_uniformbuffer.h | 3 ++- source/blender/python/intern/bpy_app_translations.c | 4 ++-- source/blender/python/intern/bpy_interface.c | 4 ++-- source/blender/python/intern/bpy_interface_run.c | 3 ++- source/blender/python/intern/bpy_library_load.c | 4 ++-- source/blender/python/intern/bpy_props.h | 4 ++-- source/blender/python/intern/bpy_rna.h | 12 ++++++------ source/blender/python/intern/bpy_rna_data.c | 2 +- source/blender/python/mathutils/mathutils_Matrix.c | 2 +- source/blender/python/mathutils/mathutils_bvhtree.c | 3 ++- source/blender/python/mathutils/mathutils_kdtree.c | 3 ++- 18 files changed, 34 insertions(+), 27 deletions(-) (limited to 'source/blender/python') diff --git a/source/blender/python/bmesh/bmesh_py_ops_call.h b/source/blender/python/bmesh/bmesh_py_ops_call.h index bb994486ed1..1c7a35788d2 100644 --- a/source/blender/python/bmesh/bmesh_py_ops_call.h +++ b/source/blender/python/bmesh/bmesh_py_ops_call.h @@ -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); diff --git a/source/blender/python/gpu/gpu_py_framebuffer.c b/source/blender/python/gpu/gpu_py_framebuffer.c index e563c6bee28..2f081fcfd8c 100644 --- a/source/blender/python/gpu/gpu_py_framebuffer.c +++ b/source/blender/python/gpu/gpu_py_framebuffer.c @@ -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; diff --git a/source/blender/python/gpu/gpu_py_framebuffer.h b/source/blender/python/gpu/gpu_py_framebuffer.h index 6727328518c..4b44436f5cf 100644 --- a/source/blender/python/gpu/gpu_py_framebuffer.h +++ b/source/blender/python/gpu/gpu_py_framebuffer.h @@ -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; diff --git a/source/blender/python/gpu/gpu_py_matrix.c b/source/blender/python/gpu/gpu_py_matrix.c index afde666056a..b379600d33c 100644 --- a/source/blender/python/gpu/gpu_py_matrix.c +++ b/source/blender/python/gpu/gpu_py_matrix.c @@ -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; diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c index 76c5ca266ad..0a8b294ea41 100644 --- a/source/blender/python/gpu/gpu_py_offscreen.c +++ b/source/blender/python/gpu/gpu_py_offscreen.c @@ -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; diff --git a/source/blender/python/gpu/gpu_py_offscreen.h b/source/blender/python/gpu/gpu_py_offscreen.h index f551730cf54..309735a6202 100644 --- a/source/blender/python/gpu/gpu_py_offscreen.h +++ b/source/blender/python/gpu/gpu_py_offscreen.h @@ -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); diff --git a/source/blender/python/gpu/gpu_py_texture.h b/source/blender/python/gpu/gpu_py_texture.h index 3eaaa3411bd..8423d0e6804 100644 --- a/source/blender/python/gpu/gpu_py_texture.h +++ b/source/blender/python/gpu/gpu_py_texture.h @@ -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); diff --git a/source/blender/python/gpu/gpu_py_uniformbuffer.h b/source/blender/python/gpu/gpu_py_uniformbuffer.h index a13c33ae78a..75d6d5e2160 100644 --- a/source/blender/python/gpu/gpu_py_uniformbuffer.h +++ b/source/blender/python/gpu/gpu_py_uniformbuffer.h @@ -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); diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c index f2a564cbb49..478ae61aecd 100644 --- a/source/blender/python/intern/bpy_app_translations.c +++ b/source/blender/python/intern/bpy_app_translations.c @@ -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). */ diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index f294f092536..832af9e8460 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -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 */ diff --git a/source/blender/python/intern/bpy_interface_run.c b/source/blender/python/intern/bpy_interface_run.c index f7272a87a17..f7d6a33c904 100644 --- a/source/blender/python/intern/bpy_interface_run.c +++ b/source/blender/python/intern/bpy_interface_run.c @@ -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 diff --git a/source/blender/python/intern/bpy_library_load.c b/source/blender/python/intern/bpy_library_load.c index 70f78c25052..2350152f07f 100644 --- a/source/blender/python/intern/bpy_library_load.c +++ b/source/blender/python/intern/bpy_library_load.c @@ -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; diff --git a/source/blender/python/intern/bpy_props.h b/source/blender/python/intern/bpy_props.h index d467166f354..bc7f0cfe416 100644 --- a/source/blender/python/intern/bpy_props.h +++ b/source/blender/python/intern/bpy_props.h @@ -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; diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h index 0f7e06354f4..c20ceaee4db 100644 --- a/source/blender/python/intern/bpy_rna.h +++ b/source/blender/python/intern/bpy_rna.h @@ -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; diff --git a/source/blender/python/intern/bpy_rna_data.c b/source/blender/python/intern/bpy_rna_data.c index 2b2460ba7ba..639999b69d4 100644 --- a/source/blender/python/intern/bpy_rna_data.c +++ b/source/blender/python/intern/bpy_rna_data.c @@ -41,7 +41,7 @@ typedef struct { PyObject_HEAD /* Required Python macro. */ - BPy_StructRNA *data_rna; + BPy_StructRNA *data_rna; char filepath[1024]; } BPy_DataContext; diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index ee1fa1c5097..21f53257154 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -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; diff --git a/source/blender/python/mathutils/mathutils_bvhtree.c b/source/blender/python/mathutils/mathutils_bvhtree.c index b00dbacad15..80919e014d5 100644 --- a/source/blender/python/mathutils/mathutils_bvhtree.c +++ b/source/blender/python/mathutils/mathutils_bvhtree.c @@ -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]; diff --git a/source/blender/python/mathutils/mathutils_kdtree.c b/source/blender/python/mathutils/mathutils_kdtree.c index 1ff574fefa8..95a3b6dc20b 100644 --- a/source/blender/python/mathutils/mathutils_kdtree.c +++ b/source/blender/python/mathutils/mathutils_kdtree.c @@ -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 */ -- cgit v1.2.3