@@ -168,6 +168,10 @@ static void Main(string[] args)
168
168
string ov_cimguiname = val [ "ov_cimguiname" ] ? . ToString ( ) ;
169
169
string cimguiname = val [ "cimguiname" ] . ToString ( ) ;
170
170
string friendlyName = val [ "funcname" ] ? . ToString ( ) ;
171
+ if ( cimguiname . EndsWith ( "_destroy" ) )
172
+ {
173
+ friendlyName = "Destroy" ;
174
+ }
171
175
if ( friendlyName == null ) { return null ; }
172
176
173
177
string exportedName = ov_cimguiname ;
@@ -208,6 +212,7 @@ static void Main(string[] args)
208
212
209
213
string structName = val [ "stname" ] . ToString ( ) ;
210
214
bool isConstructor = val . Value < bool > ( "constructor" ) ;
215
+ bool isDestructor = val . Value < bool > ( "destructor" ) ;
211
216
if ( isConstructor )
212
217
{
213
218
returnType = structName + "*" ;
@@ -221,7 +226,8 @@ static void Main(string[] args)
221
226
returnType ,
222
227
structName ,
223
228
comment ,
224
- isConstructor ) ;
229
+ isConstructor ,
230
+ isDestructor ) ;
225
231
} ) . Where ( od => od != null ) . ToArray ( ) ;
226
232
227
233
return new FunctionDefinition ( name , overloads ) ;
@@ -1134,6 +1140,7 @@ class OverloadDefinition
1134
1140
public bool IsMemberFunction { get ; }
1135
1141
public string Comment { get ; }
1136
1142
public bool IsConstructor { get ; }
1143
+ public bool IsDestructor { get ; }
1137
1144
1138
1145
public OverloadDefinition (
1139
1146
string exportedName ,
@@ -1143,7 +1150,8 @@ public OverloadDefinition(
1143
1150
string returnType ,
1144
1151
string structName ,
1145
1152
string comment ,
1146
- bool isConstructor )
1153
+ bool isConstructor ,
1154
+ bool isDestructor )
1147
1155
{
1148
1156
ExportedName = exportedName ;
1149
1157
FriendlyName = friendlyName ;
@@ -1154,6 +1162,7 @@ public OverloadDefinition(
1154
1162
IsMemberFunction = structName != "ImGui" ;
1155
1163
Comment = comment ;
1156
1164
IsConstructor = isConstructor ;
1165
+ IsDestructor = isDestructor ;
1157
1166
}
1158
1167
}
1159
1168
0 commit comments