xamarin-macios/tools
Rolf Bjarne Kvinge c3574a53a3
[generator] Use '[U]IntPtr' in P/Invoke signatures instead of 'n[u]int'. (#13043)
* [generator] Use '[U]IntPtr' in the P/Invoke signature for native enums.

* Use '[U]IntPtr' as the parameter type in the P/Invoke signature for native enum
  parameters.
* Use '[U]IntPtr' in the P/Invoke method name for native enum parameters.
* Add an explicit conversion from UIntPtr to nuint (like we already have from IntPtr
  to nint).

This makes the code identical between .NET and legacy Xamarin when using C# n[u]ints,
because those are really [U]IntPtrs.

* Use IntPtr/UIntPtr for all nint/nuint types in P/Invokes, not only native enums.

* Add a few more casts

Fixes these generator tests:

* GeneratorTests.BGenTests.FieldEnumTests
* GeneratorTests.BGenTests.NativeEnum

* [registrar] Handle UIntPtr like we do IntPtr.

Fixes this error in numerous tests:

    error MT4169: Failed to generate a P/Invoke wrapper for objc_msgSend(System.IntPtr,System.IntPtr): The registrar cannot build a signature for type `System.Void' in method `ObjCRuntime.Messaging.objc_msgSend`.

* [NativeTypes] Make IntPtr and UIntPtr behave the same.

This fixes an issue where the linked output for a 32-bit mscorlib.dll and a
64-bit mscorlib.dll would be different, because different explicit operators
for UIntPtr would be kept.

The fix works because the conversion operators for nuint will not use
UIntPtr's explicit conversion operators anymore, it will just operate on plain
memory instead.
2021-10-25 10:56:02 +02:00
..
apidiff [ApiDiffs] Applying the New Dotnet ApiDiffs to Github (#13027) 2021-10-22 10:25:33 -05:00
app-compare Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
common [generator] Use '[U]IntPtr' in P/Invoke signatures instead of 'n[u]int'. (#13043) 2021-10-25 10:56:02 +02:00
devops [ApiDiffs] Applying the New Dotnet ApiDiffs to Github (#13027) 2021-10-22 10:25:33 -05:00
dotnet-linker [dotnet] Implement support for the MtouchFloat32 MSBuild property. Fixes #12524. (#12882) 2021-10-01 08:31:11 +02:00
editors [Tools] Add editor snippets to help new developers. (#12479) 2021-08-19 19:03:14 -04:00
governance Merge xcode12 into d16-8. 2020-09-18 17:51:52 -04:00
install-source Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
linker [mtouch] Make 'MonoTouch.Dialog-1' and 'MonoTouch.NUnitLite' SDK assemblies, not product assemblies. Fixes #12862. (#12919) 2021-10-04 19:14:34 +02:00
mlaunch [Makefile] Remove warning in submake commands. (#12840) 2021-09-27 06:55:23 -04:00
mmp [MMP] If we disable mac do not try to build for dotnet. (#12739) 2021-09-15 20:54:52 -04:00
mtouch Localized file check-in by OneLocBuild Task: Build definition ID 14411: Build ID 5313177 (#12967) 2021-10-11 10:26:55 -05:00
siminstaller Always create binlogs during the build. (#12331) 2021-08-04 09:30:16 +02:00
xibuild Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
.gitignore Add scripts to calculate API diffs and generated code diff between the current build and another revision. (#3447) 2018-02-13 07:47:47 +01:00
Makefile [tools] Honor the ENABLE_DOTNET variable. Fixes #9475. (#9502) 2020-08-26 07:59:46 +02:00
compare-commits.sh [Generator Diff] Ignore file we are not interested in. (#11409) 2021-05-02 20:08:51 -04:00
diff-to-html Add scripts to calculate API diffs and generated code diff between the current build and another revision. (#3447) 2018-02-13 07:47:47 +01:00
nunit3-console-3.9.0 [xharness] Look at the exact NUnit version an NUnit project is referencing to figure out how to run it in a makefile. (#9322) 2020-08-10 10:47:45 +02:00
nunit3-console-3.10.0 [msbuild] Update tests to NUnit 3.12. (#7597) 2019-12-16 23:55:59 +01:00
nunit3-console-3.11.1 [msbuild] Update to NUnit 3.12 and NUnit.ConsoleRunner 3.11.1. (#8613) 2020-05-20 09:26:05 +02:00
tools.sln [mtouch/mmp] Rework the project files. (#8575) 2020-05-12 16:37:43 +02:00