diff options
author | Ignacio Roldán Etcheverry <ignalfonsore@gmail.com> | 2022-12-01 01:45:11 +0100 |
---|---|---|
committer | Ignacio Roldán Etcheverry <ignalfonsore@gmail.com> | 2022-12-02 14:47:12 +0100 |
commit | 17b2838f39c634324710166d2f36458906ecaf4a (patch) | |
tree | 19dc228fe31d06a50608fca6cd889669494da0de /thirdparty/misc | |
parent | f86c6b6ac47ecf3e75c74cb94fd65efa6ea2eb0c (diff) |
C#: Cleanup Variant marshaling code in source/bindings generators
This change aims to reduce the number of places that need to be changed
when adding or editing a Godot type to the bindings.
Since the addition of `Variant.From<T>/As<T>` and
`VariantUtils.CreateFrom<T>/ConvertTo<T>`, we can now replace a lot of
the previous code in the bindings generator and the source generators
that specify these conversions for each type manually.
The only exceptions are the generic Godot collections (`Array<T>` and
`Dictionary<TKey, TValue>`) which still use the old version, as that
one cannot be matched by our new conversion methods (limitation in the
language with generics, forcing us to use delegate pointers).
The cleanup applies to:
- Bindings generator:
- `TypeInterface.cs_variant_to_managed`
- `TypeInterface.cs_managed_to_variant`
- Source generators:
- `MarshalUtils.AppendNativeVariantToManagedExpr`
- `MarshalUtils.AppendManagedToNativeVariantExpr`
- `MarshalUtils.AppendVariantToManagedExpr`
- `MarshalUtils.AppendManagedToVariantExpr`
Diffstat (limited to 'thirdparty/misc')
0 files changed, 0 insertions, 0 deletions