diff options
Diffstat (limited to 'src/uscxml/plugins')
-rw-r--r-- | src/uscxml/plugins/DataModelImpl.h | 11 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/uscxml/plugins/DataModelImpl.h b/src/uscxml/plugins/DataModelImpl.h index 62453a8..e3db75a 100644 --- a/src/uscxml/plugins/DataModelImpl.h +++ b/src/uscxml/plugins/DataModelImpl.h @@ -173,10 +173,13 @@ public: virtual Data evalAsData(const std::string& content) = 0; /** - * evaluating script content without return - * @param mostly used in script content. - */ - virtual void eval(const std::string& content) { evalAsData(content); } + * Evaluating an expression + * We need an explicit 'eval' function for the LuaDataModel, see issue 118 + * @param expr An expression in the data-model's language. + */ + virtual void eval(const std::string& content) { + evalAsData(content); + } /** * Evaluate a given expression as a boolean. diff --git a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp index 8f50729..9dcbc17 100644 --- a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp +++ b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp @@ -82,7 +82,7 @@ static Data getLuaAsData(lua_State* _luaState, const luabridge::LuaRef& lua) { // we are creating __tmpFunc // then it will be assigned to data variable luabridge::setGlobal(_luaState, lua, "__tmpFunc"); - + data.atom = "__tmpFunc"; data.type = Data::INTERPRETED; } else if(lua.isLightUserdata() || lua.isUserdata()) { |