diff options
| author | David Snopek <dsnopek@gmail.com> | 2024-07-01 12:29:28 -0500 |
|---|---|---|
| committer | David Snopek <dsnopek@gmail.com> | 2024-07-01 12:29:28 -0500 |
| commit | 56cd3fd99eb76ca3da33dafb694828a7306b2c81 (patch) | |
| tree | 0f895340928675f9610160abd74d298bcae42917 | |
| parent | 53b546e1df6c732a6a59ddf0ded5eb4249664eb8 (diff) | |
| download | redot-cpp-56cd3fd99eb76ca3da33dafb694828a7306b2c81.tar.gz | |
Unexpose `UtilityFunctions::is_instance_valid()`
| -rw-r--r-- | binding_generator.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/binding_generator.py b/binding_generator.py index 754167f..e7609b2 100644 --- a/binding_generator.py +++ b/binding_generator.py @@ -2166,6 +2166,12 @@ def generate_utility_functions(api, output_dir): header.append("public:") for function in api["utility_functions"]: + if function["name"] == "is_instance_valid": + # The `is_instance_valid()` function doesn't work as developers expect, and unless used very + # carefully will cause crashes. Instead, developers should use `ObjectDB::get_instance()` + # with object ids to ensure that an instance is still valid. + continue + vararg = "is_vararg" in function and function["is_vararg"] function_signature = "\t" @@ -2200,6 +2206,9 @@ def generate_utility_functions(api, output_dir): source.append("") for function in api["utility_functions"]: + if function["name"] == "is_instance_valid": + continue + vararg = "is_vararg" in function and function["is_vararg"] function_signature = make_signature("UtilityFunctions", function) |
