diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-09-06 03:47:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-09-06 03:47:46 +0300 |
commit | 539c140b3ee695ba14c3bad80a0115eff44535d8 (patch) | |
tree | 6306d9d2897031467c801a330f45bc6d38d72664 /source | |
parent | 6d04e48539ce50f0de9cc73a36e7733aee608773 (diff) |
Correct build errors
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/gpu/gpu_py_offscreen.c | 1 | ||||
-rw-r--r-- | source/blender/python/gpu/gpu_py_vertex_buffer.c | 44 |
2 files changed, 1 insertions, 44 deletions
diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c index 36d03240786..fc1bc274845 100644 --- a/source/blender/python/gpu/gpu_py_offscreen.c +++ b/source/blender/python/gpu/gpu_py_offscreen.c @@ -41,6 +41,7 @@ #include "BKE_scene.h" #include "DNA_screen_types.h" +#include "DNA_scene_types.h" #include "DNA_view3d_types.h" #include "GPU_framebuffer.h" diff --git a/source/blender/python/gpu/gpu_py_vertex_buffer.c b/source/blender/python/gpu/gpu_py_vertex_buffer.c index cc67afa4342..40963e9551b 100644 --- a/source/blender/python/gpu/gpu_py_vertex_buffer.c +++ b/source/blender/python/gpu/gpu_py_vertex_buffer.c @@ -41,50 +41,6 @@ /* -------------------------------------------------------------------- */ -/** \name Enum Conversion - * - * Use with PyArg_ParseTuple's "O&" formatting. - * \{ */ - -static int bpygpu_ParseVertFetchMode(PyObject *o, void *p) -{ - Py_ssize_t mode_id_len; - const char *mode_id = _PyUnicode_AsStringAndSize(o, &mode_id_len); - if (mode_id == NULL) { - PyErr_Format(PyExc_ValueError, - "expected a string, got %s", - Py_TYPE(o)->tp_name); - return 0; - } -#define MATCH_ID(id) \ - if (mode_id_len == strlen(STRINGIFY(id))) { \ - if (STREQ(mode_id, STRINGIFY(id))) { \ - mode = GPU_FETCH_##id; \ - goto success; \ - } \ - } ((void)0) - - GPUVertFetchMode mode; - MATCH_ID(FLOAT); - MATCH_ID(INT); - MATCH_ID(INT_TO_FLOAT_UNIT); - MATCH_ID(INT_TO_FLOAT); -#undef MATCH_ID - PyErr_Format(PyExc_ValueError, - "unknown type literal: '%s'", - mode_id); - return 0; - -success: - (*(GPUVertFetchMode *)p) = mode; - return 1; -} - -/** \} */ - - -/* -------------------------------------------------------------------- */ - /** \name Utility Functions * \{ */ |