diff options
author | Stefan Radomski <github@mintwerk.de> | 2017-06-01 14:20:31 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2017-06-01 14:20:31 (GMT) |
commit | cfa566ab882b416396aba38252992903658f2a8b (patch) | |
tree | db7a697735e8125abfdd49c3845a26f364291f8b /src/uscxml/plugins/datamodel | |
parent | 1e84bbb24e8301ccfcf8ffd98f00447fa566c8a6 (diff) | |
download | uscxml-cfa566ab882b416396aba38252992903658f2a8b.zip uscxml-cfa566ab882b416396aba38252992903658f2a8b.tar.gz uscxml-cfa566ab882b416396aba38252992903658f2a8b.tar.bz2 |
SSL support on Win32
Diffstat (limited to 'src/uscxml/plugins/datamodel')
-rw-r--r-- | src/uscxml/plugins/datamodel/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/uscxml/plugins/datamodel/CMakeLists.txt b/src/uscxml/plugins/datamodel/CMakeLists.txt index e70598e..a03e7c8 100644 --- a/src/uscxml/plugins/datamodel/CMakeLists.txt +++ b/src/uscxml/plugins/datamodel/CMakeLists.txt @@ -72,7 +72,7 @@ if (V8_FOUND) endif() -if (LUA51_FOUND AND WITH_DM_LUA) +if (LUA_FOUND AND WITH_DM_LUA) set(USCXML_DATAMODELS "lua ${USCXML_DATAMODELS}") # Lua ecmascript datamodel file(GLOB LUA_DATAMODEL diff --git a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp index 4f78e7d..92866ee 100644 --- a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp +++ b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp @@ -163,9 +163,10 @@ static luabridge::LuaRef getDataAsLua(lua_State* _luaState, const Data& data) { luaData = luabridge::newTable(_luaState); std::map<std::string, Data>::const_iterator compoundIter = data.compound.begin(); while(compoundIter != data.compound.end()) { - if (isInteger(compoundIter->first.c_str(), 10) && strTo<size_t>(compoundIter->first) > 0) { + if (isInteger(compoundIter->first.c_str(), 10) && strTo<long>(compoundIter->first) > 0) { // it makes a difference whether we pass a numeric string or a proper number! - luaData[strTo<size_t>(compoundIter->first)] = getDataAsLua(_luaState, compoundIter->second); + // MSVC throws assertion with LuaBridge for size_t instead of int + luaData[strTo<long>(compoundIter->first)] = getDataAsLua(_luaState, compoundIter->second); } else { luaData[compoundIter->first] = getDataAsLua(_luaState, compoundIter->second); } |