Skip to content

Commit 0b161af

Browse files
authored
Disable filelib.savecode when BE_USE_BYTECODE_SAVER disabled (#463)
I think this is an unnecessary link-time dependency, otherwise if I: ``` #define BE_USE_BYTECODE_SAVER 0 ``` I'd get this link error: ``` [Linking...] /nix/store/22p5nv7fbxhm06mfkwwnibv1nsz06x4b-binutils-2.40/bin/ld: src/be_filelib.o: in function `i_savecode': be_filelib.c:(.text+0x9e): undefined reference to `be_bytecode_save_to_fs' collect2: error: ld returned 1 exit status ```
1 parent b9ce913 commit 0b161af

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/be_filelib.c

+2
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ int be_nfunc_open(bvm *vm)
234234
{ "flush", i_flush },
235235
{ "close", i_close },
236236
{ "deinit", i_close },
237+
#if BE_USE_BYTECODE_SAVER
237238
{ "savecode", i_savecode },
239+
#endif
238240
{ NULL, NULL }
239241
};
240242
fname = argc >= 1 && be_isstring(vm, 1) ? be_tostring(vm, 1) : NULL;

0 commit comments

Comments
 (0)