summaryrefslogtreecommitdiffstats
path: root/core/extension
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-09-27 13:53:16 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-09-27 13:53:16 +0200
commit8a9a26ef1980f149c6466329a989bbb930612902 (patch)
tree12979c68b0685334e0f95a0fa96e9381f347f3ec /core/extension
parent543fa16b4ce821a0118da3ef0904a105aaa046e9 (diff)
parentc2af6bcb5983356244d699735cda00b0bc5f4f8d (diff)
downloadredot-engine-8a9a26ef1980f149c6466329a989bbb930612902.tar.gz
Merge pull request #93311 from dsnopek/gdextension-required-virtuals
GDExtension: Mark virtual function as `is_required` in `extension_api.json`
Diffstat (limited to 'core/extension')
-rw-r--r--core/extension/extension_api_dump.cpp1
-rw-r--r--core/extension/make_wrappers.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/core/extension/extension_api_dump.cpp b/core/extension/extension_api_dump.cpp
index 4042d6b80d..c5f7502c12 100644
--- a/core/extension/extension_api_dump.cpp
+++ b/core/extension/extension_api_dump.cpp
@@ -1017,6 +1017,7 @@ Dictionary GDExtensionAPIDump::generate_extension_api(bool p_include_docs) {
d2["name"] = String(method_name);
d2["is_const"] = (F.flags & METHOD_FLAG_CONST) ? true : false;
d2["is_static"] = (F.flags & METHOD_FLAG_STATIC) ? true : false;
+ d2["is_required"] = (F.flags & METHOD_FLAG_VIRTUAL_REQUIRED) ? true : false;
d2["is_vararg"] = false;
d2["is_virtual"] = true;
// virtual functions have no hash since no MethodBind is involved
diff --git a/core/extension/make_wrappers.py b/core/extension/make_wrappers.py
index 54f4fd5579..665b6f0f91 100644
--- a/core/extension/make_wrappers.py
+++ b/core/extension/make_wrappers.py
@@ -55,10 +55,10 @@ def generate_mod_version(argcount, const=False, returns=False):
proto_ex = """
#define EXBIND$VER($RETTYPE m_name$ARG) \\
-GDVIRTUAL$VER($RETTYPE_##m_name$ARG)\\
+GDVIRTUAL$VER_REQUIRED($RETTYPE_##m_name$ARG)\\
virtual $RETVAL m_name($FUNCARGS) $CONST override { \\
$RETPRE\\
- GDVIRTUAL_REQUIRED_CALL(_##m_name$CALLARGS$RETREF);\\
+ GDVIRTUAL_CALL(_##m_name$CALLARGS$RETREF);\\
$RETPOST\\
}
"""