File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -2166,6 +2166,12 @@ def generate_utility_functions(api, output_dir):
2166
2166
header .append ("public:" )
2167
2167
2168
2168
for function in api ["utility_functions" ]:
2169
+ if function ["name" ] == "is_instance_valid" :
2170
+ # The `is_instance_valid()` function doesn't work as developers expect, and unless used very
2171
+ # carefully will cause crashes. Instead, developers should use `ObjectDB::get_instance()`
2172
+ # with object ids to ensure that an instance is still valid.
2173
+ continue
2174
+
2169
2175
vararg = "is_vararg" in function and function ["is_vararg" ]
2170
2176
2171
2177
function_signature = "\t "
@@ -2200,6 +2206,9 @@ def generate_utility_functions(api, output_dir):
2200
2206
source .append ("" )
2201
2207
2202
2208
for function in api ["utility_functions" ]:
2209
+ if function ["name" ] == "is_instance_valid" :
2210
+ continue
2211
+
2203
2212
vararg = "is_vararg" in function and function ["is_vararg" ]
2204
2213
2205
2214
function_signature = make_signature ("UtilityFunctions" , function )
You can’t perform that action at this time.
0 commit comments