Skip to content

Commit

Permalink
add: 添加源码版的inline的sys.lua/sysplus.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
wendal committed Oct 30, 2023
1 parent 4c82a8c commit 0cadea9
Show file tree
Hide file tree
Showing 3 changed files with 2,623 additions and 2 deletions.
5 changes: 5 additions & 0 deletions luat/vfs/luat_fs_inline.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@ extern const luadb_file_t luat_inline2_libs_64bit_size32[];
#else
extern const luadb_file_t luat_inline2_libs[];
#endif
extern const luadb_file_t luat_inline2_libs_source[];

#ifdef LUAT_USE_FS_VFS

FILE* luat_vfs_inline_fopen(void* userdata, const char *filename, const char *mode) {
//LLOGD("open inline %s", filename);
luadb_file_t* file = NULL;
#ifdef LUAT_CONF_USE_LIBSYS_SOURCE
file = luat_inline2_libs_source;
#else
#ifdef LUAT_CONF_VM_64bit
#if defined(LUA_USE_LINUX) || (defined(LUA_USE_WINDOWS) && defined(__XMAKE_BUILD__))
file = luat_inline2_libs_64bit_size64;
Expand All @@ -33,6 +37,7 @@ FILE* luat_vfs_inline_fopen(void* userdata, const char *filename, const char *mo
#endif
#else
file = luat_inline2_libs;
#endif
#endif

if (!strcmp("r", mode) || !strcmp("rb", mode)) {
Expand Down
Loading

0 comments on commit 0cadea9

Please sign in to comment.