diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-20 19:06:46 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-20 19:06:46 +0400 |
commit | 874c29cea8e6f9bc411fccf2d6f4cb07e94328d0 (patch) | |
tree | 5971e577cf7c02e05a1e37b5ad058c71a6744877 /source/gameengine/Expressions/InputParser.cpp | |
parent | 7555bfa793a2b0fc187c6211c56986f35b2d7b09 (diff) | |
parent | c5bc4e4fb1a33eda8c31f2ea02e91f32f74c8fa5 (diff) |
2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD
Notes:
* blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
Diffstat (limited to 'source/gameengine/Expressions/InputParser.cpp')
-rw-r--r-- | source/gameengine/Expressions/InputParser.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/source/gameengine/Expressions/InputParser.cpp b/source/gameengine/Expressions/InputParser.cpp index 94663c4a365..66075dd8d42 100644 --- a/source/gameengine/Expressions/InputParser.cpp +++ b/source/gameengine/Expressions/InputParser.cpp @@ -39,7 +39,12 @@ #include "IfExpr.h" #if defined(WIN32) || defined(WIN64) -#define strcasecmp _stricmp +#define strcasecmp _stricmp + +#ifndef strtoll +#define strtoll _strtoi64 +#endif + #endif /* Def WIN32 or Def WIN64 */ #define NUM_PRIORITY 6 @@ -319,12 +324,14 @@ void CParser::NextSym() } } +#if 0 int CParser::MakeInt() { // returns the integer representation of the value in the global // variable const_as_string // pre: const_as_string contains only numercal chars return atoi(const_as_string); } +#endif STR_String CParser::Symbol2Str(int s) { // returns a string representation of of symbol s, @@ -436,8 +443,8 @@ CExpression *CParser::Ex(int i) { break; case inttype: { - int temp; - temp = atoi(const_as_string); + cInt temp; + temp = strtoll(const_as_string, NULL, 10); /* atoi is for int only */ e1 = new CConstExpr(new CIntValue(temp)); break; } @@ -580,7 +587,7 @@ float CParser::GetFloat(STR_String txt) CExpression* expr = ProcessText(txt); if (expr) { val = expr->Calculate(); - result=val->GetNumber(); + result=(float)val->GetNumber(); @@ -642,7 +649,7 @@ PyObject* CParserPyMake(PyObject* ignored,PyObject* args) CExpression* expr = parser.ProcessText(txt); CValue* val = expr->Calculate(); expr->Release(); - return val; + return val->GetProxy(); } static PyMethodDef CParserMethods[] = |