From 632eaa2f13c24519f29ac124de4da32f5497297e Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Sat, 26 Nov 2022 14:46:47 -0500 Subject: Changed things to use lua compiler. --- .gitignore | 2 ++ src/lpm.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 839171d..aefd4a9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ lpm-* *.o lpm.lua.c lib/prefix +src/lpm.luac.c +src/lpm.luac diff --git a/src/lpm.c b/src/lpm.c index 03f259e..3d10b0b 100644 --- a/src/lpm.c +++ b/src/lpm.c @@ -530,8 +530,8 @@ static const luaL_Reg system_lib[] = { #endif -extern const char src_lpm_lua[]; -extern unsigned int src_lpm_lua_len; +extern const char src_lpm_luac[]; +extern unsigned int src_lpm_luac_len; int main(int argc, char* argv[]) { curl = curl_easy_init(); if (!curl) @@ -563,7 +563,7 @@ int main(int argc, char* argv[]) { #if LPM_LIVE if (luaL_loadfile(L, "src/lpm.lua") || lua_pcall(L, 0, 1, 0)) { #else - if (luaL_loadbuffer(L, src_lpm_lua, src_lpm_lua_len, "lpm.lua") || lua_pcall(L, 0, 1, 0)) { + if (luaL_loadbuffer(L, src_lpm_luac, src_lpm_luac_len, "lpm.lua") || lua_pcall(L, 0, 1, 0)) { #endif fprintf(stderr, "internal error when starting the application: %s\n", lua_tostring(L, -1)); return -1; -- cgit v1.2.3