From 0be2b20a16ee32a63701a67f38af4a8d4148890f Mon Sep 17 00:00:00 2001 From: sonoro1234 Date: Sat, 29 Jan 2022 16:14:28 +0100 Subject: [PATCH] cpp2ffi: check_template: dont add space between template and * --- generator/cpp2ffi.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generator/cpp2ffi.lua b/generator/cpp2ffi.lua index ecbf7f9..7765f83 100644 --- a/generator/cpp2ffi.lua +++ b/generator/cpp2ffi.lua @@ -157,11 +157,12 @@ local function check_template(code) te = te:gsub("%s","_") te = te:gsub("%*","Ptr") - code2 = code:gsub("(<[%w_%*%s]+>)([^%s])","%1 %2") + code2 = code:gsub("(<[%w_%*%s]+>)([^%s%*])","%1 %2") code2 = code2:gsub("<([^<>]-)>","_"..te) end return ttype,template,te,code2 end +---------------------------------------- local function parse_enum_value(value, allenums,dontpost) local function clean(val) if type(val)=="string" then