@@ -168,6 +168,10 @@ static void Main(string[] args)
168168 string ov_cimguiname = val [ "ov_cimguiname" ] ? . ToString ( ) ;
169169 string cimguiname = val [ "cimguiname" ] . ToString ( ) ;
170170 string friendlyName = val [ "funcname" ] ? . ToString ( ) ;
171+ if ( cimguiname . EndsWith ( "_destroy" ) )
172+ {
173+ friendlyName = "Destroy" ;
174+ }
171175 if ( friendlyName == null ) { return null ; }
172176
173177 string exportedName = ov_cimguiname ;
@@ -208,6 +212,7 @@ static void Main(string[] args)
208212
209213 string structName = val [ "stname" ] . ToString ( ) ;
210214 bool isConstructor = val . Value < bool > ( "constructor" ) ;
215+ bool isDestructor = val . Value < bool > ( "destructor" ) ;
211216 if ( isConstructor )
212217 {
213218 returnType = structName + "*" ;
@@ -221,7 +226,8 @@ static void Main(string[] args)
221226 returnType ,
222227 structName ,
223228 comment ,
224- isConstructor ) ;
229+ isConstructor ,
230+ isDestructor ) ;
225231 } ) . Where ( od => od != null ) . ToArray ( ) ;
226232
227233 return new FunctionDefinition ( name , overloads ) ;
@@ -1134,6 +1140,7 @@ class OverloadDefinition
11341140 public bool IsMemberFunction { get ; }
11351141 public string Comment { get ; }
11361142 public bool IsConstructor { get ; }
1143+ public bool IsDestructor { get ; }
11371144
11381145 public OverloadDefinition (
11391146 string exportedName ,
@@ -1143,7 +1150,8 @@ public OverloadDefinition(
11431150 string returnType ,
11441151 string structName ,
11451152 string comment ,
1146- bool isConstructor )
1153+ bool isConstructor ,
1154+ bool isDestructor )
11471155 {
11481156 ExportedName = exportedName ;
11491157 FriendlyName = friendlyName ;
@@ -1154,6 +1162,7 @@ public OverloadDefinition(
11541162 IsMemberFunction = structName != "ImGui" ;
11551163 Comment = comment ;
11561164 IsConstructor = isConstructor ;
1165+ IsDestructor = isDestructor ;
11571166 }
11581167 }
11591168
0 commit comments