summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-01-08 08:32:25 +0100
committerGitHub <noreply@github.com>2020-01-08 08:32:25 +0100
commit14b24b6a714283919137536eebffd31b8c7b2392 (patch)
treeda8bf5bd62863e65b84b4f44e57ed1f0872bd0dd /core
parent6fa716c67b6f17f3818858785619839da060abe7 (diff)
parent4be87c6016a5893cbde897924e540df4c988cee5 (diff)
Merge pull request #34875 from neikeq/api-hash-no-underscore-methodbinds
ClassDB: Exclude method binds starting with '_' from API hash
Diffstat (limited to 'core')
-rw-r--r--core/class_db.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/class_db.cpp b/core/class_db.cpp
index 3cd04c6573..65f0c6008c 100644
--- a/core/class_db.cpp
+++ b/core/class_db.cpp
@@ -389,6 +389,13 @@ uint64_t ClassDB::get_api_hash(APIType p_api) {
while ((k = t->method_map.next(k))) {
+ String name = k->operator String();
+
+ ERR_CONTINUE(name.empty());
+
+ if (name[0] == '_')
+ continue; // Ignore non-virtual methods that start with an underscore
+
snames.push_back(*k);
}