Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify all size_t arguments to use uint #237

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/SFML.Audio/Music.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
GCHandle pin = GCHandle.Alloc(bytes, GCHandleType.Pinned);
try
{
CPointer = sfMusic_createFromMemory(pin.AddrOfPinnedObject(), Convert.ToUInt64(bytes.Length));

Check failure on line 62 in src/SFML.Audio/Music.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 62 in src/SFML.Audio/Music.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 62 in src/SFML.Audio/Music.cs

View workflow job for this annotation

GitHub Actions / Linux .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 62 in src/SFML.Audio/Music.cs

View workflow job for this annotation

GitHub Actions / Linux .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 62 in src/SFML.Audio/Music.cs

View workflow job for this annotation

GitHub Actions / Linux .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 62 in src/SFML.Audio/Music.cs

View workflow job for this annotation

GitHub Actions / Linux .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 62 in src/SFML.Audio/Music.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 62 in src/SFML.Audio/Music.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 62 in src/SFML.Audio/Music.cs

View workflow job for this annotation

GitHub Actions / Linux .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 62 in src/SFML.Audio/Music.cs

View workflow job for this annotation

GitHub Actions / Linux .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 62 in src/SFML.Audio/Music.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 62 in src/SFML.Audio/Music.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 62 in src/SFML.Audio/Music.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 62 in src/SFML.Audio/Music.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 62 in src/SFML.Audio/Music.cs

View workflow job for this annotation

GitHub Actions / Windows .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 62 in src/SFML.Audio/Music.cs

View workflow job for this annotation

GitHub Actions / Windows .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 62 in src/SFML.Audio/Music.cs

View workflow job for this annotation

GitHub Actions / Windows .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 62 in src/SFML.Audio/Music.cs

View workflow job for this annotation

GitHub Actions / Windows .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'
}
finally
{
Expand Down Expand Up @@ -390,7 +390,7 @@
private unsafe static extern IntPtr sfMusic_createFromStream(IntPtr stream);

[DllImport(CSFML.audio, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern IntPtr sfMusic_createFromMemory(IntPtr data, ulong size);
private static extern IntPtr sfMusic_createFromMemory(IntPtr data, uint size);

[DllImport(CSFML.audio, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern void sfMusic_destroy(IntPtr MusicStream);
Expand Down
2 changes: 1 addition & 1 deletion src/SFML.Audio/SoundBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
GCHandle pin = GCHandle.Alloc(bytes, GCHandleType.Pinned);
try
{
CPointer = sfSoundBuffer_createFromMemory(pin.AddrOfPinnedObject(), Convert.ToUInt64(bytes.Length));

Check failure on line 78 in src/SFML.Audio/SoundBuffer.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 78 in src/SFML.Audio/SoundBuffer.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 78 in src/SFML.Audio/SoundBuffer.cs

View workflow job for this annotation

GitHub Actions / Linux .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 78 in src/SFML.Audio/SoundBuffer.cs

View workflow job for this annotation

GitHub Actions / Linux .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 78 in src/SFML.Audio/SoundBuffer.cs

View workflow job for this annotation

GitHub Actions / Linux .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 78 in src/SFML.Audio/SoundBuffer.cs

View workflow job for this annotation

GitHub Actions / Linux .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 78 in src/SFML.Audio/SoundBuffer.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 78 in src/SFML.Audio/SoundBuffer.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 78 in src/SFML.Audio/SoundBuffer.cs

View workflow job for this annotation

GitHub Actions / Linux .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 78 in src/SFML.Audio/SoundBuffer.cs

View workflow job for this annotation

GitHub Actions / Linux .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 78 in src/SFML.Audio/SoundBuffer.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 78 in src/SFML.Audio/SoundBuffer.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 78 in src/SFML.Audio/SoundBuffer.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 78 in src/SFML.Audio/SoundBuffer.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 78 in src/SFML.Audio/SoundBuffer.cs

View workflow job for this annotation

GitHub Actions / Windows .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 78 in src/SFML.Audio/SoundBuffer.cs

View workflow job for this annotation

GitHub Actions / Windows .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 78 in src/SFML.Audio/SoundBuffer.cs

View workflow job for this annotation

GitHub Actions / Windows .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 78 in src/SFML.Audio/SoundBuffer.cs

View workflow job for this annotation

GitHub Actions / Windows .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'
}
finally
{
Expand Down Expand Up @@ -224,7 +224,7 @@
private unsafe static extern IntPtr sfSoundBuffer_createFromStream(IntPtr stream);

[DllImport(CSFML.audio, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private unsafe static extern IntPtr sfSoundBuffer_createFromMemory(IntPtr data, ulong size);
private unsafe static extern IntPtr sfSoundBuffer_createFromMemory(IntPtr data, uint size);

[DllImport(CSFML.audio, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private unsafe static extern IntPtr sfSoundBuffer_createFromSamples(short* Samples, ulong SampleCount, uint ChannelsCount, uint SampleRate);
Expand Down
2 changes: 1 addition & 1 deletion src/SFML.Graphics/Font.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ internal struct InfoMarshalData
private static extern IntPtr sfFont_createFromStream(IntPtr stream);

[DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern IntPtr sfFont_createFromMemory(IntPtr data, ulong size);
private static extern IntPtr sfFont_createFromMemory(IntPtr data, uint size);

[DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern IntPtr sfFont_copy(IntPtr Font);
Expand Down
2 changes: 1 addition & 1 deletion src/SFML.Graphics/Image.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
GCHandle pin = GCHandle.Alloc(bytes, GCHandleType.Pinned);
try
{
CPointer = sfImage_createFromMemory(pin.AddrOfPinnedObject(), Convert.ToUInt64(bytes.Length));

Check failure on line 93 in src/SFML.Graphics/Image.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 93 in src/SFML.Graphics/Image.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 93 in src/SFML.Graphics/Image.cs

View workflow job for this annotation

GitHub Actions / Linux .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 93 in src/SFML.Graphics/Image.cs

View workflow job for this annotation

GitHub Actions / Linux .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 93 in src/SFML.Graphics/Image.cs

View workflow job for this annotation

GitHub Actions / Linux .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 93 in src/SFML.Graphics/Image.cs

View workflow job for this annotation

GitHub Actions / Linux .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 93 in src/SFML.Graphics/Image.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 93 in src/SFML.Graphics/Image.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 93 in src/SFML.Graphics/Image.cs

View workflow job for this annotation

GitHub Actions / Linux .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 93 in src/SFML.Graphics/Image.cs

View workflow job for this annotation

GitHub Actions / Linux .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 93 in src/SFML.Graphics/Image.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 93 in src/SFML.Graphics/Image.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 93 in src/SFML.Graphics/Image.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 93 in src/SFML.Graphics/Image.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 93 in src/SFML.Graphics/Image.cs

View workflow job for this annotation

GitHub Actions / Windows .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 93 in src/SFML.Graphics/Image.cs

View workflow job for this annotation

GitHub Actions / Windows .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 93 in src/SFML.Graphics/Image.cs

View workflow job for this annotation

GitHub Actions / Windows .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 93 in src/SFML.Graphics/Image.cs

View workflow job for this annotation

GitHub Actions / Windows .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'
}
finally
{
Expand Down Expand Up @@ -365,7 +365,7 @@
private unsafe static extern IntPtr sfImage_createFromStream(IntPtr stream);

[DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private unsafe static extern IntPtr sfImage_createFromMemory(IntPtr data, ulong size);
private unsafe static extern IntPtr sfImage_createFromMemory(IntPtr data, uint size);

[DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern IntPtr sfImage_copy(IntPtr Image);
Expand Down
2 changes: 1 addition & 1 deletion src/SFML.Graphics/Texture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
try
{
IntRect rect = new IntRect(0, 0, 0, 0);
CPointer = sfTexture_createFromMemory(pin.AddrOfPinnedObject(), Convert.ToUInt64(bytes.Length), ref rect);

Check failure on line 140 in src/SFML.Graphics/Texture.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 140 in src/SFML.Graphics/Texture.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 140 in src/SFML.Graphics/Texture.cs

View workflow job for this annotation

GitHub Actions / Linux .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 140 in src/SFML.Graphics/Texture.cs

View workflow job for this annotation

GitHub Actions / Linux .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 140 in src/SFML.Graphics/Texture.cs

View workflow job for this annotation

GitHub Actions / Linux .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 140 in src/SFML.Graphics/Texture.cs

View workflow job for this annotation

GitHub Actions / Linux .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 140 in src/SFML.Graphics/Texture.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 140 in src/SFML.Graphics/Texture.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 140 in src/SFML.Graphics/Texture.cs

View workflow job for this annotation

GitHub Actions / Linux .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 140 in src/SFML.Graphics/Texture.cs

View workflow job for this annotation

GitHub Actions / Linux .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 140 in src/SFML.Graphics/Texture.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 140 in src/SFML.Graphics/Texture.cs

View workflow job for this annotation

GitHub Actions / MacOS .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 140 in src/SFML.Graphics/Texture.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 140 in src/SFML.Graphics/Texture.cs

View workflow job for this annotation

GitHub Actions / Windows .NET Core 3.1

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 140 in src/SFML.Graphics/Texture.cs

View workflow job for this annotation

GitHub Actions / Windows .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 140 in src/SFML.Graphics/Texture.cs

View workflow job for this annotation

GitHub Actions / Windows .NET 7

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 140 in src/SFML.Graphics/Texture.cs

View workflow job for this annotation

GitHub Actions / Windows .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'

Check failure on line 140 in src/SFML.Graphics/Texture.cs

View workflow job for this annotation

GitHub Actions / Windows .NET 6

Argument 2: cannot convert from 'ulong' to 'uint'
}
finally
{
Expand Down Expand Up @@ -493,7 +493,7 @@
private static extern IntPtr sfTexture_createFromImage(IntPtr image, ref IntRect area);

[DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern IntPtr sfTexture_createFromMemory(IntPtr data, ulong size, ref IntRect area);
private static extern IntPtr sfTexture_createFromMemory(IntPtr data, uint size, ref IntRect area);

[DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern IntPtr sfTexture_copy(IntPtr texture);
Expand Down
Loading