diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-03 15:35:22 +0100 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-03 15:35:22 +0100 |
| commit | 5a413894fc370c32d1c2045f64234ce33c1e3356 (patch) | |
| tree | 7fc0a4d8fd11d464c0f617447f65fd650c2e25d8 /modules/mono/glue/runtime_interop.cpp | |
| parent | 91dfd6484b67821f0052c8d2205dd24e62a052ac (diff) | |
| parent | 7403a3a11bd2ce24b7422160bc4636a611726b4a (diff) | |
Merge pull request #72635 from RedworkDE/net-nodepath-iequatable
C#: Implement `IEquatable<>` and equality operators in `NodePath`
Diffstat (limited to 'modules/mono/glue/runtime_interop.cpp')
| -rw-r--r-- | modules/mono/glue/runtime_interop.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/mono/glue/runtime_interop.cpp b/modules/mono/glue/runtime_interop.cpp index d17fe3e75f..a90b07620c 100644 --- a/modules/mono/glue/runtime_interop.cpp +++ b/modules/mono/glue/runtime_interop.cpp @@ -1141,6 +1141,14 @@ bool godotsharp_node_path_is_absolute(const NodePath *p_self) { return p_self->is_absolute(); } +bool godotsharp_node_path_equals(const NodePath *p_self, const NodePath *p_other) { + return *p_self == *p_other; +} + +int godotsharp_node_path_hash(const NodePath *p_self) { + return p_self->hash(); +} + void godotsharp_randomize() { Math::randomize(); } @@ -1477,6 +1485,8 @@ static const void *unmanaged_callbacks[]{ (void *)godotsharp_node_path_get_subname, (void *)godotsharp_node_path_get_subname_count, (void *)godotsharp_node_path_is_absolute, + (void *)godotsharp_node_path_equals, + (void *)godotsharp_node_path_hash, (void *)godotsharp_bytes_to_var, (void *)godotsharp_convert, (void *)godotsharp_hash, |