Skip to content

Commit

Permalink
Add deprecation note to node.flashreload (#3273)
Browse files Browse the repository at this point in the history
  • Loading branch information
HHHartmann authored Sep 8, 2020
1 parent d88c14b commit 4d78479
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/modules/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,12 @@ static int node_lfsreload (lua_State *L) {
return 1;
}

// Lua: n = node.flashreload(lfsimage)
static int lua_lfsreload_deprecated (lua_State *L) {
platform_print_deprecation_note("node.flashreload", "soon. Use node.LFS interface instead");
return node_lfsreload (L);
}

// Lua: n = node.flashindex(module)
// Lua: n = node.LFS.get(module)
static int node_lfsindex (lua_State *L) {
Expand Down Expand Up @@ -872,8 +878,8 @@ LROT_BEGIN(node, NULL, 0)
LROT_FUNCENTRY( heap, node_heap )
LROT_FUNCENTRY( info, node_info )
LROT_TABENTRY( task, node_task )
LROT_FUNCENTRY( flashreload, lua_lfsreload_deprecated )
LROT_FUNCENTRY( flashindex, node_lfsindex )
LROT_FUNCENTRY( flashreload, node_lfsreload )
LROT_TABENTRY( LFS, node_lfs )
LROT_FUNCENTRY( setonerror, node_setonerror )
LROT_FUNCENTRY( startupcommand, node_startupcommand )
Expand Down

0 comments on commit 4d78479

Please sign in to comment.