From 070491257991a8cd3ec137e948b7cc19c30632f2 Mon Sep 17 00:00:00 2001 From: Victor Bombi Date: Wed, 28 Oct 2020 17:51:16 +0100 Subject: [PATCH] cpp2ffi: get_parents_nameC correction --- generator/cpp2ffi.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generator/cpp2ffi.lua b/generator/cpp2ffi.lua index 6f1add9..f2de998 100644 --- a/generator/cpp2ffi.lua +++ b/generator/cpp2ffi.lua @@ -1167,10 +1167,10 @@ function M.Parser() local function get_parents_nameC(it) local parnam = "" while it.parent do - parnam = it.parent.name.."_"..parnam + parnam = it.parent.name.."::"..parnam it = it.parent end - if parnam:sub(-1)=="_" then parnam = parnam:sub(1,-2) end + if parnam~="" then parnam = parnam:sub(1,-3) end return parnam end function par:gen_structs_and_enums()