Skip to content

Commit 4d78479

Browse files
authored
Add deprecation note to node.flashreload (#3273)
1 parent d88c14b commit 4d78479

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/modules/node.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,12 @@ static int node_lfsreload (lua_State *L) {
652652
return 1;
653653
}
654654

655+
// Lua: n = node.flashreload(lfsimage)
656+
static int lua_lfsreload_deprecated (lua_State *L) {
657+
platform_print_deprecation_note("node.flashreload", "soon. Use node.LFS interface instead");
658+
return node_lfsreload (L);
659+
}
660+
655661
// Lua: n = node.flashindex(module)
656662
// Lua: n = node.LFS.get(module)
657663
static int node_lfsindex (lua_State *L) {
@@ -872,8 +878,8 @@ LROT_BEGIN(node, NULL, 0)
872878
LROT_FUNCENTRY( heap, node_heap )
873879
LROT_FUNCENTRY( info, node_info )
874880
LROT_TABENTRY( task, node_task )
881+
LROT_FUNCENTRY( flashreload, lua_lfsreload_deprecated )
875882
LROT_FUNCENTRY( flashindex, node_lfsindex )
876-
LROT_FUNCENTRY( flashreload, node_lfsreload )
877883
LROT_TABENTRY( LFS, node_lfs )
878884
LROT_FUNCENTRY( setonerror, node_setonerror )
879885
LROT_FUNCENTRY( startupcommand, node_startupcommand )

0 commit comments

Comments
 (0)