Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-05-03 11:09:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-03 11:09:52 +0300
commit41a63556cffb13d38135fcb152b266c0fe72cef2 (patch)
treea671800325a919d4104c4527b7cb6b9362dc1190 /source/blender/python/bmesh
parent688c7240be33df94658b18bce7c9535e74d7f577 (diff)
Revert "Cleanup: add semicolon after PyObject_VAR_HEAD"
This reverts commit a01bcfa6366f893fbc8fdbf537d91ece4832ea03. This causes MSVC2019 build to fail with error C2059 Unfortunately this means we have to put up with bad formatting in Python structs.
Diffstat (limited to 'source/blender/python/bmesh')
-rw-r--r--source/blender/python/bmesh/bmesh_py_types.h27
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_customdata.h9
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_meshdata.c9
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_meshdata.h3
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_select.h6
5 files changed, 18 insertions, 36 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types.h b/source/blender/python/bmesh/bmesh_py_types.h
index e37a88a53b0..460e7f82222 100644
--- a/source/blender/python/bmesh/bmesh_py_types.h
+++ b/source/blender/python/bmesh/bmesh_py_types.h
@@ -54,45 +54,38 @@ extern PyTypeObject BPy_BMIter_Type;
/* cast from _any_ bmesh type - they all have BMesh first */
typedef struct BPy_BMGeneric {
- PyObject_VAR_HEAD;
- struct BMesh *bm; /* keep first */
+ PyObject_VAR_HEAD struct BMesh *bm; /* keep first */
} BPy_BMGeneric;
/* BPy_BMVert/BPy_BMEdge/BPy_BMFace/BPy_BMLoop can cast to this */
typedef struct BPy_BMElem {
- PyObject_VAR_HEAD;
- struct BMesh *bm; /* keep first */
+ PyObject_VAR_HEAD struct BMesh *bm; /* keep first */
struct BMElem *ele;
} BPy_BMElem;
typedef struct BPy_BMesh {
- PyObject_VAR_HEAD;
- struct BMesh *bm; /* keep first */
+ PyObject_VAR_HEAD struct BMesh *bm; /* keep first */
int flag;
} BPy_BMesh;
/* element types */
typedef struct BPy_BMVert {
- PyObject_VAR_HEAD;
- struct BMesh *bm; /* keep first */
+ PyObject_VAR_HEAD struct BMesh *bm; /* keep first */
struct BMVert *v;
} BPy_BMVert;
typedef struct BPy_BMEdge {
- PyObject_VAR_HEAD;
- struct BMesh *bm; /* keep first */
+ PyObject_VAR_HEAD struct BMesh *bm; /* keep first */
struct BMEdge *e;
} BPy_BMEdge;
typedef struct BPy_BMFace {
- PyObject_VAR_HEAD;
- struct BMesh *bm; /* keep first */
+ PyObject_VAR_HEAD struct BMesh *bm; /* keep first */
struct BMFace *f;
} BPy_BMFace;
typedef struct BPy_BMLoop {
- PyObject_VAR_HEAD;
- struct BMesh *bm; /* keep first */
+ PyObject_VAR_HEAD struct BMesh *bm; /* keep first */
struct BMLoop *l;
} BPy_BMLoop;
@@ -106,8 +99,7 @@ typedef struct BPy_BMLoop {
* - BPy_BMLoopSeq_Type
*/
typedef struct BPy_BMElemSeq {
- PyObject_VAR_HEAD;
- struct BMesh *bm; /* keep first */
+ PyObject_VAR_HEAD struct BMesh *bm; /* keep first */
/* if this is a sequence on an existing element,
* loops of faces for eg.
@@ -123,8 +115,7 @@ typedef struct BPy_BMElemSeq {
} BPy_BMElemSeq;
typedef struct BPy_BMIter {
- PyObject_VAR_HEAD;
- struct BMesh *bm; /* keep first */
+ PyObject_VAR_HEAD struct BMesh *bm; /* keep first */
BMIter iter;
} BPy_BMIter;
diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.h b/source/blender/python/bmesh/bmesh_py_types_customdata.h
index 96ca2cb6ace..95836707e3d 100644
--- a/source/blender/python/bmesh/bmesh_py_types_customdata.h
+++ b/source/blender/python/bmesh/bmesh_py_types_customdata.h
@@ -39,23 +39,20 @@ extern PyTypeObject BPy_BMLayerItem_Type;
/* all layers for vert/edge/face/loop */
typedef struct BPy_BMLayerAccess {
- PyObject_VAR_HEAD;
- struct BMesh *bm; /* keep first */
+ PyObject_VAR_HEAD struct BMesh *bm; /* keep first */
char htype;
} BPy_BMLayerAccess;
/* access different layer types deform/uv/vertexcolor */
typedef struct BPy_BMLayerCollection {
- PyObject_VAR_HEAD;
- struct BMesh *bm; /* keep first */
+ PyObject_VAR_HEAD struct BMesh *bm; /* keep first */
char htype;
int type; /* customdata type - CD_XXX */
} BPy_BMLayerCollection;
/* access a specific layer directly */
typedef struct BPy_BMLayerItem {
- PyObject_VAR_HEAD;
- struct BMesh *bm; /* keep first */
+ PyObject_VAR_HEAD struct BMesh *bm; /* keep first */
char htype;
int type; /* customdata type - CD_XXX */
int index; /* index of this layer type */
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
index c7133fcbf3a..0aa01ddb594 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
@@ -48,8 +48,7 @@
#define BPy_BMLoopUV_Check(v) (Py_TYPE(v) == &BPy_BMLoopUV_Type)
typedef struct BPy_BMLoopUV {
- PyObject_VAR_HEAD;
- MLoopUV *data;
+ PyObject_VAR_HEAD MLoopUV *data;
} BPy_BMLoopUV;
PyDoc_STRVAR(bpy_bmloopuv_uv_doc,
@@ -168,8 +167,7 @@ PyObject *BPy_BMLoopUV_CreatePyObject(struct MLoopUV *mloopuv)
#define BPy_BMVertSkin_Check(v) (Py_TYPE(v) == &BPy_BMVertSkin_Type)
typedef struct BPy_BMVertSkin {
- PyObject_VAR_HEAD;
- MVertSkin *data;
+ PyObject_VAR_HEAD MVertSkin *data;
} BPy_BMVertSkin;
PyDoc_STRVAR(bpy_bmvertskin_radius_doc,
@@ -407,8 +405,7 @@ PyObject *BPy_BMLoopColor_CreatePyObject(struct MLoopCol *data)
#define BPy_BMDeformVert_Check(v) (Py_TYPE(v) == &BPy_BMDeformVert_Type)
typedef struct BPy_BMDeformVert {
- PyObject_VAR_HEAD;
- MDeformVert *data;
+ PyObject_VAR_HEAD MDeformVert *data;
} BPy_BMDeformVert;
/* Mapping Protocols
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.h b/source/blender/python/bmesh/bmesh_py_types_meshdata.h
index 85fb42558e7..5211c30ec7e 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.h
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.h
@@ -30,8 +30,7 @@ extern PyTypeObject BPy_BMDeformVert_Type;
#define BPy_BMLoopUV_Check(v) (Py_TYPE(v) == &BPy_BMLoopUV_Type)
typedef struct BPy_BMGenericMeshData {
- PyObject_VAR_HEAD;
- void *data;
+ PyObject_VAR_HEAD void *data;
} BPy_BMGenericMeshData;
struct MDeformVert;
diff --git a/source/blender/python/bmesh/bmesh_py_types_select.h b/source/blender/python/bmesh/bmesh_py_types_select.h
index 2fee3e23841..593857a5083 100644
--- a/source/blender/python/bmesh/bmesh_py_types_select.h
+++ b/source/blender/python/bmesh/bmesh_py_types_select.h
@@ -33,13 +33,11 @@ extern PyTypeObject BPy_BMEditSelIter_Type;
#define BPy_BMSelectHistoryIter_Check(v) (Py_TYPE(v) == &BPy_BMEditSelIter_Type)
typedef struct BPy_BMEditSelSeq {
- PyObject_VAR_HEAD;
- struct BMesh *bm; /* keep first */
+ PyObject_VAR_HEAD struct BMesh *bm; /* keep first */
} BPy_BMEditSelSeq;
typedef struct BPy_BMEditSelIter {
- PyObject_VAR_HEAD;
- struct BMesh *bm; /* keep first */
+ PyObject_VAR_HEAD struct BMesh *bm; /* keep first */
struct BMEditSelection *ese;
} BPy_BMEditSelIter;