From bc708a092d5c4a617ddf6738ae6777ef3b1cfd16 Mon Sep 17 00:00:00 2001 From: Victor Bombi Date: Wed, 3 Feb 2021 10:20:02 +0100 Subject: [PATCH] cpp2ffi: char* -> Str, ImStr -> STR for backward compability --- generator/cpp2ffi.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generator/cpp2ffi.lua b/generator/cpp2ffi.lua index b5b0697..2d4f848 100644 --- a/generator/cpp2ffi.lua +++ b/generator/cpp2ffi.lua @@ -491,12 +491,13 @@ local function typetoStr(typ) typ = typ:gsub("unsigned%s","u") typ = typ:gsub("const%s","")--"c") typ = typ:gsub("%s+","_") - typ = typ:gsub("charPtr","Chpt") + typ = typ:gsub("charPtr","Str") typ = typ:gsub("int","Int") typ = typ:gsub("bool","Bool") typ = typ:gsub("float","Float") typ = typ:gsub("uInt","Uint") typ = typ:gsub("ImGui","") + typ = typ:gsub("ImStr","STR") typ = typ:gsub("Im","") typ = typ:gsub("[<>]","") return typ