diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-13 15:25:11 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-13 15:25:11 +0200 |
commit | 99bc4905cbdeec4f91673aaf501703e28180c9d9 (patch) | |
tree | 0caccfc6ff48a26ddac07440c791085d9c6ddd68 /core/extension | |
parent | 9eb8eb5f7de1ae9baef9750c6611fcfdeeec12b6 (diff) | |
parent | 1bd35973626587199f614f6fedeeca6cea5f31f3 (diff) |
Merge pull request #67138 from touilleMan/gdextension-typed-enum-in-struct
Use enum type in GDExtension info structs for better readability
Diffstat (limited to 'core/extension')
-rw-r--r-- | core/extension/gdnative_interface.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/extension/gdnative_interface.h b/core/extension/gdnative_interface.h index 9ac5cc9398..4513c66ab5 100644 --- a/core/extension/gdnative_interface.h +++ b/core/extension/gdnative_interface.h @@ -201,18 +201,18 @@ typedef GDNativeBool (*GDNativeExtensionClassGet)(GDExtensionClassInstancePtr p_ typedef uint64_t (*GDNativeExtensionClassGetRID)(GDExtensionClassInstancePtr p_instance); typedef struct { - uint32_t type; + GDNativeVariantType type; const char *name; const char *class_name; - uint32_t hint; + uint32_t hint; // Bitfield of `PropertyHint` (defined in `extension_api.json`) const char *hint_string; - uint32_t usage; + uint32_t usage; // Bitfield of `PropertyUsageFlags` (defined in `extension_api.json`) } GDNativePropertyInfo; typedef struct { const char *name; GDNativePropertyInfo return_value; - uint32_t flags; // From GDNativeExtensionClassMethodFlags + uint32_t flags; // Bitfield of `GDNativeExtensionClassMethodFlags` int32_t id; GDNativePropertyInfo *arguments; uint32_t argument_count; @@ -292,7 +292,7 @@ typedef struct { void *method_userdata; GDNativeExtensionClassMethodCall call_func; GDNativeExtensionClassMethodPtrCall ptrcall_func; - uint32_t method_flags; /* GDNativeExtensionClassMethodFlags */ + uint32_t method_flags; // Bitfield of `GDNativeExtensionClassMethodFlags` uint32_t argument_count; GDNativeBool has_return_value; GDNativeExtensionClassMethodGetArgumentType get_argument_type_func; |