summaryrefslogtreecommitdiffstats
path: root/modules/mono/editor/bindings_generator.cpp
diff options
context:
space:
mode:
authorIgnacio Etcheverry <neikeq@users.noreply.github.com>2018-03-13 17:00:28 +0100
committerGitHub <noreply@github.com>2018-03-13 17:00:28 +0100
commitd6c802f3aeda53634a54fe13f97b94dbcefa9eeb (patch)
tree76263d58d567d57ec6906781d4fa3320724cd2a0 /modules/mono/editor/bindings_generator.cpp
parent30d690ecfcbd9bbf0fdf49c688c92a851dd9289e (diff)
parentef5672d3f94a7321ed779c922088bb72adbb1521 (diff)
downloadredot-engine-d6c802f3aeda53634a54fe13f97b94dbcefa9eeb.tar.gz
Merge pull request #17235 from paulloz/mono-glue-enhancements
[Mono] change function names to PascalCase and set abstract classes as abstract
Diffstat (limited to 'modules/mono/editor/bindings_generator.cpp')
-rw-r--r--modules/mono/editor/bindings_generator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index 315c1e2f1c..a210b8e480 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -103,7 +103,7 @@
#define C_METHOD_MANAGED_TO_DICT C_NS_MONOMARSHAL "::mono_object_to_Dictionary"
#define C_METHOD_MANAGED_FROM_DICT C_NS_MONOMARSHAL "::Dictionary_to_mono_object"
-#define BINDINGS_GENERATOR_VERSION UINT32_C(1)
+#define BINDINGS_GENERATOR_VERSION UINT32_C(2)
const char *BindingsGenerator::TypeInterface::DEFAULT_VARARG_C_IN = "\t%0 %1_in = %1;\n";
@@ -730,7 +730,8 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
}
output.push_back(INDENT1 "public ");
- output.push_back(itype.is_singleton ? "static class " : "class ");
+ bool is_abstract = !ClassDB::can_instance(itype.name) && ClassDB::is_class_enabled(itype.name); // can_instance returns true if there's a constructor and the class is not 'disabled'
+ output.push_back(itype.is_singleton ? "static class " : (is_abstract ? "abstract class " : "class "));
output.push_back(itype.proxy_name);
if (itype.is_singleton) {