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:
authormano-wii <germano.costa@ig.com.br>2018-10-07 18:21:09 +0300
committermano-wii <germano.costa@ig.com.br>2018-10-07 18:21:09 +0300
commit91bfea5b052a6276654eb4f71c71707cda3d4305 (patch)
tree0fbf7bbd80306a97a8bd8acf77aeb7fd31d78220 /source/blender/python/generic/bgl.c
parentee2e30683c1c4ebe14096d8e5f64a5a0099343e6 (diff)
CPython: py_capi_utils: use more descriptive names for format string utilities.
Diffstat (limited to 'source/blender/python/generic/bgl.c')
-rw-r--r--source/blender/python/generic/bgl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c
index a89525d942f..33ad824bace 100644
--- a/source/blender/python/generic/bgl.c
+++ b/source/blender/python/generic/bgl.c
@@ -480,14 +480,16 @@ int BGL_typeSize(int type)
static int gl_buffer_type_from_py_buffer(Py_buffer *pybuffer)
{
- const char format = PyC_Formatstr_get(pybuffer->format);
+ const char format = PyC_Formatchar_get(pybuffer->format);
Py_ssize_t itemsize = pybuffer->itemsize;
- if (PyC_Formatstr_is_float(format)) {
+ if (PyC_Formatchar_is_floating_type(format)) {
if (itemsize == 4) return GL_FLOAT;
if (itemsize == 8) return GL_DOUBLE;
}
- if (PyC_Formatstr_is_byte(format) || PyC_Formatstr_is_int(format)) {
+ if (PyC_Formatchar_is_byte_type(format) ||
+ PyC_Formatchar_is_integer_type(format))
+ {
if (itemsize == 1) return GL_BYTE;
if (itemsize == 2) return GL_SHORT;
if (itemsize == 4) return GL_INT;