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:
Diffstat (limited to 'source/gameengine/Expressions/InputParser.cpp')
-rw-r--r--source/gameengine/Expressions/InputParser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/gameengine/Expressions/InputParser.cpp b/source/gameengine/Expressions/InputParser.cpp
index 24033dd21a2..32a9de32e21 100644
--- a/source/gameengine/Expressions/InputParser.cpp
+++ b/source/gameengine/Expressions/InputParser.cpp
@@ -631,7 +631,8 @@ void CParser::SetContext(CValue* context)
PyObject* CParserPyMake(PyObject* ignored,PyObject* args)
{
char* txt;
- Py_Try(PyArg_ParseTuple(args,"s",&txt));
+ if (!PyArg_ParseTuple(args,"s",&txt))
+ return NULL;
CParser parser;
CExpression* expr = parser.ProcessText(txt);
CValue* val = expr->Calculate();
@@ -641,7 +642,7 @@ PyObject* CParserPyMake(PyObject* ignored,PyObject* args)
static PyMethodDef CParserMethods[] =
{
- { "calc", CParserPyMake , Py_NEWARGS},
+ { "calc", CParserPyMake , METH_VARARGS},
{ NULL,NULL} // Sentinel
};