From 41a63556cffb13d38135fcb152b266c0fe72cef2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 3 May 2019 18:09:04 +1000 Subject: 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. --- source/blender/python/gpu/gpu_py_batch.h | 6 +++--- source/blender/python/gpu/gpu_py_element.h | 3 +-- source/blender/python/gpu/gpu_py_shader.h | 3 +-- source/blender/python/gpu/gpu_py_vertex_buffer.h | 6 +++--- source/blender/python/gpu/gpu_py_vertex_format.h | 3 +-- 5 files changed, 9 insertions(+), 12 deletions(-) (limited to 'source/blender/python/gpu') diff --git a/source/blender/python/gpu/gpu_py_batch.h b/source/blender/python/gpu/gpu_py_batch.h index 5ec1857fc1a..1e916afcc2e 100644 --- a/source/blender/python/gpu/gpu_py_batch.h +++ b/source/blender/python/gpu/gpu_py_batch.h @@ -30,9 +30,9 @@ extern PyTypeObject BPyGPUBatch_Type; #define BPyGPUBatch_Check(v) (Py_TYPE(v) == &BPyGPUBatch_Type) typedef struct BPyGPUBatch { - PyObject_VAR_HEAD; - /* The batch is owned, we may support thin wrapped batches later. */ - struct GPUBatch *batch; + PyObject_VAR_HEAD + /* The batch is owned, we may support thin wrapped batches later. */ + struct GPUBatch *batch; #ifdef USE_GPU_PY_REFERENCES /* Just to keep a user to prevent freeing buf's we're using */ PyObject *references; diff --git a/source/blender/python/gpu/gpu_py_element.h b/source/blender/python/gpu/gpu_py_element.h index 9d70379a2ec..055c9d54ecf 100644 --- a/source/blender/python/gpu/gpu_py_element.h +++ b/source/blender/python/gpu/gpu_py_element.h @@ -26,8 +26,7 @@ extern PyTypeObject BPyGPUIndexBuf_Type; #define BPyGPUIndexBuf_Check(v) (Py_TYPE(v) == &BPyGPUIndexBuf_Type) typedef struct BPyGPUIndexBuf { - PyObject_VAR_HEAD; - struct GPUIndexBuf *elem; + PyObject_VAR_HEAD struct GPUIndexBuf *elem; } BPyGPUIndexBuf; PyObject *BPyGPUIndexBuf_CreatePyObject(struct GPUIndexBuf *elem); diff --git a/source/blender/python/gpu/gpu_py_shader.h b/source/blender/python/gpu/gpu_py_shader.h index 4d59dbc8e37..92873753039 100644 --- a/source/blender/python/gpu/gpu_py_shader.h +++ b/source/blender/python/gpu/gpu_py_shader.h @@ -26,8 +26,7 @@ extern PyTypeObject BPyGPUShader_Type; #define BPyGPUShader_Check(v) (Py_TYPE(v) == &BPyGPUShader_Type) typedef struct BPyGPUShader { - PyObject_VAR_HEAD; - struct GPUShader *shader; + PyObject_VAR_HEAD struct GPUShader *shader; bool is_builtin; } BPyGPUShader; diff --git a/source/blender/python/gpu/gpu_py_vertex_buffer.h b/source/blender/python/gpu/gpu_py_vertex_buffer.h index 484508b8875..b7124d245a9 100644 --- a/source/blender/python/gpu/gpu_py_vertex_buffer.h +++ b/source/blender/python/gpu/gpu_py_vertex_buffer.h @@ -28,9 +28,9 @@ extern PyTypeObject BPyGPUVertBuf_Type; #define BPyGPUVertBuf_Check(v) (Py_TYPE(v) == &BPyGPUVertBuf_Type) typedef struct BPyGPUVertBuf { - PyObject_VAR_HEAD; - /* The buf is owned, we may support thin wrapped batches later. */ - struct GPUVertBuf *buf; + PyObject_VAR_HEAD + /* The buf is owned, we may support thin wrapped batches later. */ + struct GPUVertBuf *buf; } BPyGPUVertBuf; PyObject *BPyGPUVertBuf_CreatePyObject(struct GPUVertBuf *vbo) ATTR_NONNULL(1); diff --git a/source/blender/python/gpu/gpu_py_vertex_format.h b/source/blender/python/gpu/gpu_py_vertex_format.h index dc100586f59..8ef466aa918 100644 --- a/source/blender/python/gpu/gpu_py_vertex_format.h +++ b/source/blender/python/gpu/gpu_py_vertex_format.h @@ -28,8 +28,7 @@ extern PyTypeObject BPyGPUVertFormat_Type; #define BPyGPUVertFormat_Check(v) (Py_TYPE(v) == &BPyGPUVertFormat_Type) typedef struct BPyGPUVertFormat { - PyObject_VAR_HEAD; - struct GPUVertFormat fmt; + PyObject_VAR_HEAD struct GPUVertFormat fmt; } BPyGPUVertFormat; PyObject *BPyGPUVertFormat_CreatePyObject(struct GPUVertFormat *fmt); -- cgit v1.2.3