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>2018-10-08 00:37:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-08 00:37:32 +0300
commitd022794cad977229386934e7d25365270671874f (patch)
treeec43bc243fc0259d827e65a82fa12f93e3f3e8ac /source/blender/python/generic/bgl.c
parent1fd1735df0bf2aa39b863a372a2e0f0ad91d1545 (diff)
Cleanup: rename checks for Python struct strings
Using 'format' prefix made this read as if t was for string formatting. Use 'PyC_StructFmt' prefix instead since these values are compatible with formatting from Python's 'struct' module.
Diffstat (limited to 'source/blender/python/generic/bgl.c')
-rw-r--r--source/blender/python/generic/bgl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c
index 33ad824bace..6e1c28e1310 100644
--- a/source/blender/python/generic/bgl.c
+++ b/source/blender/python/generic/bgl.c
@@ -480,15 +480,15 @@ int BGL_typeSize(int type)
static int gl_buffer_type_from_py_buffer(Py_buffer *pybuffer)
{
- const char format = PyC_Formatchar_get(pybuffer->format);
+ const char format = PyC_StructFmt_type_from_str(pybuffer->format);
Py_ssize_t itemsize = pybuffer->itemsize;
- if (PyC_Formatchar_is_floating_type(format)) {
+ if (PyC_StructFmt_type_is_float_any(format)) {
if (itemsize == 4) return GL_FLOAT;
if (itemsize == 8) return GL_DOUBLE;
}
- if (PyC_Formatchar_is_byte_type(format) ||
- PyC_Formatchar_is_integer_type(format))
+ if (PyC_StructFmt_type_is_byte(format) ||
+ PyC_StructFmt_type_is_int_any(format))
{
if (itemsize == 1) return GL_BYTE;
if (itemsize == 2) return GL_SHORT;