Differences From Artifact [3535fb21b6]:
- File tools/makeshim.lua — part of check-in [a4a0570841] at 2021-12-26 20:01:30 on branch trunk — add C wrapper to generate true standalone binary embedding cortav bytecode (user: lexi, size: 1861) [annotate] [blame] [check-ins using]
To Artifact [f2235ca34c]:
- File tool/makeshim.lua — part of check-in [e51980e07a] at 2021-12-27 05:51:11 on branch trunk — more tweaks, fixes, and additions than i can keep track of. major additions to documentation. spiffed up html renderer's footnotes and TOC dramatically (user: lexi, size: 1858) [annotate] [blame] [check-ins using]
18 18 local main = [[ 19 19 int main(int argc, char** argv) { 20 20 lua_State* l = luaL_newstate(); 21 21 luaL_openlibs(l); 22 22 23 23 // pass arguments thru to lua 24 24 lua_newtable(l); 25 - for(size_t i = argc; i < argc; ++i) { 25 + for(size_t i = 0; i < argc; ++i) { 26 26 lua_pushstring(l,argv[i]); 27 27 lua_rawseti(l, -2, i); 28 28 } 29 29 lua_setglobal(l, "arg"); 30 30 31 31 // load and run our payload 32 32 int e = luaL_loadbufferx(l, ct_bytecode, sizeof(ct_bytecode), "cortav", "b");