From 19917edbf61fac431256f14682c331d8af1d9f34 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Wed, 15 Nov 2023 18:57:47 -0300 Subject: [PATCH] Remove `text` field from `ccinfo` table --- lualib/nelua/ccompiler.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lualib/nelua/ccompiler.lua b/lualib/nelua/ccompiler.lua index f1195ba3..1dfeb46d 100644 --- a/lualib/nelua/ccompiler.lua +++ b/lualib/nelua/ccompiler.lua @@ -214,7 +214,7 @@ local function get_cc_info(cc, cflags) except.raisef("failed to retrieve C compiler information: %s", stderr) end local text = stdout:gsub('#[^\n]*\n', ''):gsub('\n%s+','\n') - local ccinfo = {text=text} + local ccinfo = {} for name,value in text:gmatch('%s*([a-zA-Z0-9_]+)%s*=%s*([^;\n]+);') do if value:match('^[0-9]+L$') then value = tonumber(value:sub(1,-2)) @@ -261,7 +261,7 @@ local function get_cc_info(cc, cflags) except.assertraisef(not ccinfo.sizeof_size_t or ccinfo.sizeof_size_t == ccinfo.sizeof_pointer, "target C 'size_t' size is different from the pointer size") end - return ccinfo + return ccinfo, text end get_cc_info = memoize(get_cc_info) @@ -270,7 +270,7 @@ function compiler.get_cc_info() end function compiler.compile_code(ccode, cfile, compileopts) - local ccinfotext = compiler.get_cc_info().text + local _, ccinfotext = compiler.get_cc_info() local cflags = get_compiler_cflags(compileopts) local binfile = cfile:gsub('.c$','') local ccmd = get_compile_args(cfile, binfile, cflags)