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>2015-09-09 20:59:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-09-09 20:59:18 +0300
commit02b9921b75e6b2b6e83763519db2bb1e510fcd19 (patch)
tree4bd1a9ee37e9ca0807561696c97646dad8575419 /source/blender
parentd4ca74c227ee3d86d659e1a084c6ece6433def49 (diff)
bgl: fix implicit overflow
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/python/generic/bgl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c
index 137fa24c1b3..cd6ef3f16a4 100644
--- a/source/blender/python/generic/bgl.c
+++ b/source/blender/python/generic/bgl.c
@@ -1667,6 +1667,13 @@ static void py_module_dict_add_int(PyObject *dict, const char *name, int value)
Py_DECREF(item);
}
+static void py_module_dict_add_int64(PyObject *dict, const char *name, int64_t value)
+{
+ PyObject *item;
+ PyDict_SetItemString(dict, name, item = PyLong_FromLongLong(value));
+ Py_DECREF(item);
+}
+
static void py_module_dict_add_method(PyObject *submodule, PyObject *dict, PyMethodDef *method_def, bool is_valid)
{
if (is_valid) {
@@ -2332,6 +2339,7 @@ PyObject *BPyInit_bgl(void)
}
#define PY_DICT_ADD_INT(x) py_module_dict_add_int(dict, #x, x)
+#define PY_DICT_ADD_INT64(x) py_module_dict_add_int64(dict, #x, x)
/* GL_VERSION_1_1 */
{
@@ -3631,7 +3639,7 @@ PyObject *BPyInit_bgl(void)
PY_DICT_ADD_INT(GL_TEXTURE_FIXED_SAMPLE_LOCATIONS);
PY_DICT_ADD_INT(GL_TEXTURE_SAMPLES);
PY_DICT_ADD_INT(GL_TIMEOUT_EXPIRED);
- PY_DICT_ADD_INT(GL_TIMEOUT_IGNORED);
+ PY_DICT_ADD_INT64(GL_TIMEOUT_IGNORED);
PY_DICT_ADD_INT(GL_TRIANGLES_ADJACENCY);
PY_DICT_ADD_INT(GL_TRIANGLE_STRIP_ADJACENCY);
PY_DICT_ADD_INT(GL_UNSIGNALED);