Merge pull request #80527 from raulsntos/dotnet/generate-compat-methods-from-classdb

C#: Generate and use compat methods
This commit is contained in:
Rémi Verschelde
2023-09-26 13:44:52 +02:00
7 changed files with 197 additions and 12 deletions
+14
View File
@@ -133,6 +133,11 @@ class BindingsGenerator {
*/
String proxy_name;
/**
* Hash of the ClassDB method
*/
uint64_t hash = 0;
/**
* [TypeInterface::name] of the return type
*/
@@ -168,6 +173,12 @@ class BindingsGenerator {
*/
bool is_internal = false;
/**
* Determines if the method is a compatibility method added to avoid breaking binary compatibility.
* These methods will be generated but hidden and are considered deprecated.
*/
bool is_compat = false;
List<ArgumentInterface> arguments;
const DocData::MethodDoc *method_doc = nullptr;
@@ -787,6 +798,9 @@ class BindingsGenerator {
void _populate_global_constants();
bool _method_has_conflicting_signature(const MethodInterface &p_imethod, const TypeInterface &p_itype);
bool _method_has_conflicting_signature(const MethodInterface &p_imethod_left, const MethodInterface &p_imethod_right);
Error _generate_cs_type(const TypeInterface &itype, const String &p_output_file);
Error _generate_cs_property(const TypeInterface &p_itype, const PropertyInterface &p_iprop, StringBuilder &p_output);