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/generic
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/generic')
-rw-r--r--source/blender/python/generic/bgl.h3
-rw-r--r--source/blender/python/generic/idprop_py_api.h13
-rw-r--r--source/blender/python/generic/imbuf_py_api.c6
3 files changed, 9 insertions, 13 deletions
diff --git a/source/blender/python/generic/bgl.h b/source/blender/python/generic/bgl.h
index a8bd3ecff69..8c81dc48340 100644
--- a/source/blender/python/generic/bgl.h
+++ b/source/blender/python/generic/bgl.h
@@ -33,8 +33,7 @@ int BGL_typeSize(int type);
* For Python access to OpenGL functions requiring a pointer.
*/
typedef struct _Buffer {
- PyObject_VAR_HEAD;
- PyObject *parent;
+ PyObject_VAR_HEAD PyObject *parent;
int type; /* GL_BYTE, GL_SHORT, GL_INT, GL_FLOAT */
int ndimensions;
diff --git a/source/blender/python/generic/idprop_py_api.h b/source/blender/python/generic/idprop_py_api.h
index 334be96759d..49094f95ecb 100644
--- a/source/blender/python/generic/idprop_py_api.h
+++ b/source/blender/python/generic/idprop_py_api.h
@@ -37,22 +37,19 @@ extern PyTypeObject BPy_IDGroup_Type;
#define BPy_IDGroup_CheckExact(v) (Py_TYPE(v) == &BPy_IDGroup_Type)
typedef struct BPy_IDProperty {
- PyObject_VAR_HEAD;
- struct ID *id; /* can be NULL */
- struct IDProperty *prop; /* must be second member */
+ PyObject_VAR_HEAD struct ID *id; /* can be NULL */
+ struct IDProperty *prop; /* must be second member */
struct IDProperty *parent;
PyObject *data_wrap;
} BPy_IDProperty;
typedef struct BPy_IDArray {
- PyObject_VAR_HEAD;
- struct ID *id; /* can be NULL */
- struct IDProperty *prop; /* must be second member */
+ PyObject_VAR_HEAD struct ID *id; /* can be NULL */
+ struct IDProperty *prop; /* must be second member */
} BPy_IDArray;
typedef struct BPy_IDGroup_Iter {
- PyObject_VAR_HEAD;
- BPy_IDProperty *group;
+ PyObject_VAR_HEAD BPy_IDProperty *group;
struct IDProperty *cur;
int mode;
} BPy_IDGroup_Iter;
diff --git a/source/blender/python/generic/imbuf_py_api.c b/source/blender/python/generic/imbuf_py_api.c
index b848f9a3524..26e4e5bcf32 100644
--- a/source/blender/python/generic/imbuf_py_api.c
+++ b/source/blender/python/generic/imbuf_py_api.c
@@ -46,9 +46,9 @@ static PyObject *Py_ImBuf_CreatePyObject(ImBuf *ibuf);
* \{ */
typedef struct Py_ImBuf {
- PyObject_VAR_HEAD;
- /* can be NULL */
- ImBuf *ibuf;
+ PyObject_VAR_HEAD
+ /* can be NULL */
+ ImBuf *ibuf;
} Py_ImBuf;
static int py_imbuf_valid_check(Py_ImBuf *self)