diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-04-20 12:07:26 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-04-20 12:07:26 +0300 |
commit | 0aa2eed0c2e039b3ec69f15e306af212d51f2f5d (patch) | |
tree | 05e3c8875b1bc2fd8c373d01f35601e74e81057a /source/gameengine/Expressions | |
parent | bf6bde232d42c3e1a41a3841292150fae3d214cc (diff) |
Compilation error fix for MSVC: It does not support expressions in array
declarations
Diffstat (limited to 'source/gameengine/Expressions')
-rw-r--r-- | source/gameengine/Expressions/KX_PythonCallBack.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/gameengine/Expressions/KX_PythonCallBack.cpp b/source/gameengine/Expressions/KX_PythonCallBack.cpp index 1d97a8c7384..fbc250a1b3d 100644 --- a/source/gameengine/Expressions/KX_PythonCallBack.cpp +++ b/source/gameengine/Expressions/KX_PythonCallBack.cpp @@ -28,6 +28,8 @@ #include <iostream> #include <stdarg.h> +#include "BLI_alloca.h" + /** Check if a python value is a function and have the correct number of arguments. * \param value The python value to check. * \param minargcount The minimum of arguments possible. @@ -84,7 +86,7 @@ static PyObject *CreatePythonTuple(unsigned int argcount, PyObject **arglist) void RunPythonCallBackList(PyObject *functionlist, PyObject **arglist, unsigned int minargcount, unsigned int maxargcount) { unsigned int size = PyList_Size(functionlist); - PyObject *argTuples[maxargcount - minargcount + 1]; + PyObject **argTuples = (PyObject **)BLI_array_alloca(argTuples, maxargcount - minargcount + 1); memset(argTuples, 0, sizeof(PyObject *) * (maxargcount - minargcount + 1)); for (unsigned int i = 0; i < size; ++i) { |