summaryrefslogtreecommitdiffstats
path: root/modules/mono/glue/GodotSharp/Godot.SourceGenerators.Internal/ExtensionMethods.cs
Commit message (Collapse)AuthorAgeFilesLines
* C#: Compare symbol names without null flow stateRaul Santos2023-07-061-1/+1
|
* C#: Add `global::` namespace to generated sourceRaul Santos2022-11-261-9/+19
| | | | | Adds `global::` to the fully qualified types in source generators to prevent ambiguity.
* C#: Replace P/Invoke with delegate pointersIgnacio Roldán Etcheverry2022-08-221-0/+119
- Moves interop functions to UnmanagedCallbacks struct that contains the function pointers and is passed to C#. - Implements UnmanagedCallbacksGenerator, a C# source generator that generates the UnmanagedCallbacks struct in C# and the body for the NativeFuncs methods (their implementation just calls the function pointer in the UnmanagedCallbacks). The generated methods are needed because .NET pins byref parameters of native calls, even if they are 'ref struct's, which don't need pinning. The generated methods use `Unsafe.AsPointer` so that we can benefit from byref parameters without suffering overhead of pinning. Co-authored-by: Raul Santos <raulsntos@gmail.com>