diff options
author | David Snopek <dsnopek@gmail.com> | 2024-06-18 10:07:35 -0500 |
---|---|---|
committer | David Snopek <dsnopek@gmail.com> | 2024-09-11 16:48:14 -0500 |
commit | c2af6bcb5983356244d699735cda00b0bc5f4f8d (patch) | |
tree | 378e12ff67ccca0ef8da1aef0e09978feef9ee97 /core/extension | |
parent | 2c136e6170a40f58f2dfb89d32eadfca7156ef37 (diff) | |
download | redot-engine-c2af6bcb5983356244d699735cda00b0bc5f4f8d.tar.gz |
GDExtension: Mark virtual function as `is_required` in `extension_api.json`
Co-authored-by: Jovan Gerodetti <jovan.gerodetti@titannano.de>
Diffstat (limited to 'core/extension')
-rw-r--r-- | core/extension/extension_api_dump.cpp | 1 | ||||
-rw-r--r-- | core/extension/make_wrappers.py | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/core/extension/extension_api_dump.cpp b/core/extension/extension_api_dump.cpp index 296ebc901f..affe0371ff 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\\ } """ |