static sdkbox::FBAPIParam luaValueMap_to_APIParam(const LuaValueDict &dict)
{
    sdkbox::FBAPIParam param;
    for (LuaValueDictIterator it = dict.begin(); it != dict.end(); it++)
    {
        param[it->first] = it->second.stringValue();
    }
    return param;
}
Exemple #2
0
void LuaStack::pushLuaValueDict(const LuaValueDict& dict)
{
    lua_newtable(_state);                                              /* L: table */
    for (LuaValueDictIterator it = dict.begin(); it != dict.end(); ++it)
    {
        lua_pushstring(_state, it->first.c_str());                     /* L: table key */
        pushLuaValue(it->second);                                     /* L: table key value */
        lua_rawset(_state, -3);                     /* table.key = value, L: table */
    }
}