add AggressiveInlining attribute

This commit is contained in:
Vinzenz Schroeter 2024-10-19 16:19:09 +02:00
parent f968f92917
commit 0b80ce4968
9 changed files with 53 additions and 1 deletions

1
.gitmodules vendored
View file

@ -1,3 +1,4 @@
[submodule "crates/servicepoint_csbindgen"] [submodule "crates/servicepoint_csbindgen"]
path = crates/servicepoint_csbindgen path = crates/servicepoint_csbindgen
url = https://github.com/kaesaecracker/servicepoint_csbindgen.git url = https://github.com/kaesaecracker/servicepoint_csbindgen.git
branch = "main"

View file

@ -54,6 +54,7 @@ namespace ServicePoint
/// - the returned instance is freed in some way, either by using a consuming function or /// - the returned instance is freed in some way, either by using a consuming function or
/// by explicitly calling `sp_bitvec_free`. /// by explicitly calling `sp_bitvec_free`.
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static BitVec Load(byte* data, nuint data_length) public static BitVec Load(byte* data, nuint data_length)
{ {
return new BitVec(BitVec.sp_bitvec_load(data, data_length)); return new BitVec(BitVec.sp_bitvec_load(data, data_length));
@ -77,6 +78,7 @@ namespace ServicePoint
/// - the returned instance is freed in some way, either by using a consuming function or /// - the returned instance is freed in some way, either by using a consuming function or
/// by explicitly calling `sp_bitvec_free`. /// by explicitly calling `sp_bitvec_free`.
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public BitVec Clone() public BitVec Clone()
{ {
return new BitVec(BitVec.sp_bitvec_clone(this.Instance)); return new BitVec(BitVec.sp_bitvec_clone(this.Instance));
@ -104,6 +106,7 @@ namespace ServicePoint
/// - `bit_vec` points to a valid [SPBitVec] /// - `bit_vec` points to a valid [SPBitVec]
/// - `bit_vec` is not written to concurrently /// - `bit_vec` is not written to concurrently
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public bool Get(nuint index) public bool Get(nuint index)
{ {
return BitVec.sp_bitvec_get(this.Instance, index); return BitVec.sp_bitvec_get(this.Instance, index);
@ -130,6 +133,7 @@ namespace ServicePoint
/// - `bit_vec` points to a valid [SPBitVec] /// - `bit_vec` points to a valid [SPBitVec]
/// - `bit_vec` is not written to or read from concurrently /// - `bit_vec` is not written to or read from concurrently
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Set(nuint index, bool value) public void Set(nuint index, bool value)
{ {
BitVec.sp_bitvec_set(this.Instance, index, value); BitVec.sp_bitvec_set(this.Instance, index, value);
@ -154,6 +158,7 @@ namespace ServicePoint
/// - `bit_vec` points to a valid [SPBitVec] /// - `bit_vec` points to a valid [SPBitVec]
/// - `bit_vec` is not written to or read from concurrently /// - `bit_vec` is not written to or read from concurrently
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Fill(bool value) public void Fill(bool value)
{ {
BitVec.sp_bitvec_fill(this.Instance, value); BitVec.sp_bitvec_fill(this.Instance, value);
@ -176,6 +181,7 @@ namespace ServicePoint
/// ///
/// - `bit_vec` points to a valid [SPBitVec] /// - `bit_vec` points to a valid [SPBitVec]
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint Len() public nuint Len()
{ {
return BitVec.sp_bitvec_len(this.Instance); return BitVec.sp_bitvec_len(this.Instance);
@ -198,6 +204,7 @@ namespace ServicePoint
/// ///
/// - `bit_vec` points to a valid [SPBitVec] /// - `bit_vec` points to a valid [SPBitVec]
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public bool IsEmpty() public bool IsEmpty()
{ {
return BitVec.sp_bitvec_is_empty(this.Instance); return BitVec.sp_bitvec_is_empty(this.Instance);
@ -222,6 +229,7 @@ namespace ServicePoint
/// - the returned memory range is never accessed after the passed [SPBitVec] has been freed /// - the returned memory range is never accessed after the passed [SPBitVec] has been freed
/// - the returned memory range is never accessed concurrently, either via the [SPBitVec] or directly /// - the returned memory range is never accessed concurrently, either via the [SPBitVec] or directly
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public SPByteSlice UnsafeDataRef() public SPByteSlice UnsafeDataRef()
{ {
return BitVec.sp_bitvec_unsafe_data_ref(this.Instance); return BitVec.sp_bitvec_unsafe_data_ref(this.Instance);

View file

@ -61,6 +61,7 @@ namespace ServicePoint
/// - the returned instance is freed in some way, either by using a consuming function or /// - the returned instance is freed in some way, either by using a consuming function or
/// by explicitly calling `sp_bitmap_free`. /// by explicitly calling `sp_bitmap_free`.
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Bitmap Load(nuint width, nuint height, byte* data, nuint data_length) public static Bitmap Load(nuint width, nuint height, byte* data, nuint data_length)
{ {
return new Bitmap(Bitmap.sp_bitmap_load(width, height, data, data_length)); return new Bitmap(Bitmap.sp_bitmap_load(width, height, data, data_length));
@ -84,6 +85,7 @@ namespace ServicePoint
/// - the returned instance is freed in some way, either by using a consuming function or /// - the returned instance is freed in some way, either by using a consuming function or
/// by explicitly calling `sp_bitmap_free`. /// by explicitly calling `sp_bitmap_free`.
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public Bitmap Clone() public Bitmap Clone()
{ {
return new Bitmap(Bitmap.sp_bitmap_clone(this.Instance)); return new Bitmap(Bitmap.sp_bitmap_clone(this.Instance));
@ -109,6 +111,7 @@ namespace ServicePoint
/// - `bitmap` points to a valid [SPBitmap] /// - `bitmap` points to a valid [SPBitmap]
/// - `bitmap` is not written to concurrently /// - `bitmap` is not written to concurrently
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public bool Get(nuint x, nuint y) public bool Get(nuint x, nuint y)
{ {
return Bitmap.sp_bitmap_get(this.Instance, x, y); return Bitmap.sp_bitmap_get(this.Instance, x, y);
@ -137,6 +140,7 @@ namespace ServicePoint
/// - `bitmap` points to a valid [SPBitmap] /// - `bitmap` points to a valid [SPBitmap]
/// - `bitmap` is not written to or read from concurrently /// - `bitmap` is not written to or read from concurrently
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Set(nuint x, nuint y, bool value) public void Set(nuint x, nuint y, bool value)
{ {
Bitmap.sp_bitmap_set(this.Instance, x, y, value); Bitmap.sp_bitmap_set(this.Instance, x, y, value);
@ -161,6 +165,7 @@ namespace ServicePoint
/// - `bitmap` points to a valid [SPBitmap] /// - `bitmap` points to a valid [SPBitmap]
/// - `bitmap` is not written to or read from concurrently /// - `bitmap` is not written to or read from concurrently
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Fill(bool value) public void Fill(bool value)
{ {
Bitmap.sp_bitmap_fill(this.Instance, value); Bitmap.sp_bitmap_fill(this.Instance, value);
@ -183,6 +188,7 @@ namespace ServicePoint
/// ///
/// - `bitmap` points to a valid [SPBitmap] /// - `bitmap` points to a valid [SPBitmap]
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint Width() public nuint Width()
{ {
return Bitmap.sp_bitmap_width(this.Instance); return Bitmap.sp_bitmap_width(this.Instance);
@ -205,6 +211,7 @@ namespace ServicePoint
/// ///
/// - `bitmap` points to a valid [SPBitmap] /// - `bitmap` points to a valid [SPBitmap]
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint Height() public nuint Height()
{ {
return Bitmap.sp_bitmap_height(this.Instance); return Bitmap.sp_bitmap_height(this.Instance);
@ -225,6 +232,7 @@ namespace ServicePoint
/// - the returned memory range is never accessed after the passed [SPBitmap] has been freed /// - the returned memory range is never accessed after the passed [SPBitmap] has been freed
/// - the returned memory range is never accessed concurrently, either via the [SPBitmap] or directly /// - the returned memory range is never accessed concurrently, either via the [SPBitmap] or directly
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public SPByteSlice UnsafeDataRef() public SPByteSlice UnsafeDataRef()
{ {
return Bitmap.sp_bitmap_unsafe_data_ref(this.Instance); return Bitmap.sp_bitmap_unsafe_data_ref(this.Instance);

View file

@ -47,6 +47,7 @@ namespace ServicePoint
/// - the returned instance is freed in some way, either by using a consuming function or /// - the returned instance is freed in some way, either by using a consuming function or
/// by explicitly calling `sp_brightness_grid_free`. /// by explicitly calling `sp_brightness_grid_free`.
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static BrightnessGrid Load(nuint width, nuint height, byte* data, nuint data_length) public static BrightnessGrid Load(nuint width, nuint height, byte* data, nuint data_length)
{ {
return new BrightnessGrid(BrightnessGrid.sp_brightness_grid_load(width, height, data, data_length)); return new BrightnessGrid(BrightnessGrid.sp_brightness_grid_load(width, height, data, data_length));
@ -74,6 +75,7 @@ namespace ServicePoint
/// - the returned instance is freed in some way, either by using a consuming function or /// - the returned instance is freed in some way, either by using a consuming function or
/// by explicitly calling `sp_brightness_grid_free`. /// by explicitly calling `sp_brightness_grid_free`.
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public BrightnessGrid Clone() public BrightnessGrid Clone()
{ {
return new BrightnessGrid(BrightnessGrid.sp_brightness_grid_clone(this.Instance)); return new BrightnessGrid(BrightnessGrid.sp_brightness_grid_clone(this.Instance));
@ -101,6 +103,7 @@ namespace ServicePoint
/// - `brightness_grid` points to a valid [SPBrightnessGrid] /// - `brightness_grid` points to a valid [SPBrightnessGrid]
/// - `brightness_grid` is not written to concurrently /// - `brightness_grid` is not written to concurrently
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public byte Get(nuint x, nuint y) public byte Get(nuint x, nuint y)
{ {
return BrightnessGrid.sp_brightness_grid_get(this.Instance, x, y); return BrightnessGrid.sp_brightness_grid_get(this.Instance, x, y);
@ -130,6 +133,7 @@ namespace ServicePoint
/// - `brightness_grid` points to a valid [SPBitVec] /// - `brightness_grid` points to a valid [SPBitVec]
/// - `brightness_grid` is not written to or read from concurrently /// - `brightness_grid` is not written to or read from concurrently
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Set(nuint x, nuint y, byte value) public void Set(nuint x, nuint y, byte value)
{ {
BrightnessGrid.sp_brightness_grid_set(this.Instance, x, y, value); BrightnessGrid.sp_brightness_grid_set(this.Instance, x, y, value);
@ -155,6 +159,7 @@ namespace ServicePoint
/// - `brightness_grid` points to a valid [SPBrightnessGrid] /// - `brightness_grid` points to a valid [SPBrightnessGrid]
/// - `brightness_grid` is not written to or read from concurrently /// - `brightness_grid` is not written to or read from concurrently
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Fill(byte value) public void Fill(byte value)
{ {
BrightnessGrid.sp_brightness_grid_fill(this.Instance, value); BrightnessGrid.sp_brightness_grid_fill(this.Instance, value);
@ -179,6 +184,7 @@ namespace ServicePoint
/// ///
/// - `brightness_grid` points to a valid [SPBrightnessGrid] /// - `brightness_grid` points to a valid [SPBrightnessGrid]
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint Width() public nuint Width()
{ {
return BrightnessGrid.sp_brightness_grid_width(this.Instance); return BrightnessGrid.sp_brightness_grid_width(this.Instance);
@ -203,6 +209,7 @@ namespace ServicePoint
/// ///
/// - `brightness_grid` points to a valid [SPBrightnessGrid] /// - `brightness_grid` points to a valid [SPBrightnessGrid]
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint Height() public nuint Height()
{ {
return BrightnessGrid.sp_brightness_grid_height(this.Instance); return BrightnessGrid.sp_brightness_grid_height(this.Instance);
@ -229,6 +236,7 @@ namespace ServicePoint
/// - the returned memory range is never accessed after the passed [SPBrightnessGrid] has been freed /// - the returned memory range is never accessed after the passed [SPBrightnessGrid] has been freed
/// - the returned memory range is never accessed concurrently, either via the [SPBrightnessGrid] or directly /// - the returned memory range is never accessed concurrently, either via the [SPBrightnessGrid] or directly
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public SPByteSlice UnsafeDataRef() public SPByteSlice UnsafeDataRef()
{ {
return BrightnessGrid.sp_brightness_grid_unsafe_data_ref(this.Instance); return BrightnessGrid.sp_brightness_grid_unsafe_data_ref(this.Instance);

View file

@ -37,6 +37,7 @@ namespace ServicePoint
/// ///
/// servicepoint_csbindgen_consumes: packet /// servicepoint_csbindgen_consumes: packet
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Command? TryFromPacket(Packet packet) public static Command? TryFromPacket(Packet packet)
{ {
var native = Command.sp_command_try_from_packet(packet.Into()); var native = Command.sp_command_try_from_packet(packet.Into());
@ -61,6 +62,7 @@ namespace ServicePoint
/// - the returned [SPCommand] instance is freed in some way, either by using a consuming function or /// - the returned [SPCommand] instance is freed in some way, either by using a consuming function or
/// by explicitly calling `sp_command_free`. /// by explicitly calling `sp_command_free`.
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public Command Clone() public Command Clone()
{ {
return new Command(Command.sp_command_clone(this.Instance)); return new Command(Command.sp_command_clone(this.Instance));
@ -86,6 +88,7 @@ namespace ServicePoint
/// - the returned [SPCommand] instance is freed in some way, either by using a consuming function or /// - the returned [SPCommand] instance is freed in some way, either by using a consuming function or
/// by explicitly calling `sp_command_free`. /// by explicitly calling `sp_command_free`.
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Command Clear() public static Command Clear()
{ {
return new Command(Command.sp_command_clear()); return new Command(Command.sp_command_clear());
@ -105,6 +108,7 @@ namespace ServicePoint
/// - the returned [SPCommand] instance is freed in some way, either by using a consuming function or /// - the returned [SPCommand] instance is freed in some way, either by using a consuming function or
/// by explicitly calling `sp_command_free`. /// by explicitly calling `sp_command_free`.
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Command HardReset() public static Command HardReset()
{ {
return new Command(Command.sp_command_hard_reset()); return new Command(Command.sp_command_hard_reset());
@ -122,6 +126,7 @@ namespace ServicePoint
/// - the returned [SPCommand] instance is freed in some way, either by using a consuming function or /// - the returned [SPCommand] instance is freed in some way, either by using a consuming function or
/// by explicitly calling `sp_command_free`. /// by explicitly calling `sp_command_free`.
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Command FadeOut() public static Command FadeOut()
{ {
return new Command(Command.sp_command_fade_out()); return new Command(Command.sp_command_fade_out());
@ -143,6 +148,7 @@ namespace ServicePoint
/// - the returned [SPCommand] instance is freed in some way, either by using a consuming function or /// - the returned [SPCommand] instance is freed in some way, either by using a consuming function or
/// by explicitly calling `sp_command_free`. /// by explicitly calling `sp_command_free`.
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Command Brightness(byte brightness) public static Command Brightness(byte brightness)
{ {
return new Command(Command.sp_command_brightness(brightness)); return new Command(Command.sp_command_brightness(brightness));
@ -170,6 +176,7 @@ namespace ServicePoint
/// ///
/// servicepoint_csbindgen_consumes: grid /// servicepoint_csbindgen_consumes: grid
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Command CharBrightness(nuint x, nuint y, BrightnessGrid grid) public static Command CharBrightness(nuint x, nuint y, BrightnessGrid grid)
{ {
return new Command(Command.sp_command_char_brightness(x, y, grid.Into())); return new Command(Command.sp_command_char_brightness(x, y, grid.Into()));
@ -204,6 +211,7 @@ namespace ServicePoint
/// ///
/// servicepoint_csbindgen_consumes: bit_vec /// servicepoint_csbindgen_consumes: bit_vec
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Command BitmapLinear(nuint offset, BitVec bit_vec, CompressionCode compression) public static Command BitmapLinear(nuint offset, BitVec bit_vec, CompressionCode compression)
{ {
return new Command(Command.sp_command_bitmap_linear(offset, bit_vec.Into(), compression)); return new Command(Command.sp_command_bitmap_linear(offset, bit_vec.Into(), compression));
@ -238,6 +246,7 @@ namespace ServicePoint
/// ///
/// servicepoint_csbindgen_consumes: bit_vec /// servicepoint_csbindgen_consumes: bit_vec
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Command BitmapLinearAnd(nuint offset, BitVec bit_vec, CompressionCode compression) public static Command BitmapLinearAnd(nuint offset, BitVec bit_vec, CompressionCode compression)
{ {
return new Command(Command.sp_command_bitmap_linear_and(offset, bit_vec.Into(), compression)); return new Command(Command.sp_command_bitmap_linear_and(offset, bit_vec.Into(), compression));
@ -272,6 +281,7 @@ namespace ServicePoint
/// ///
/// servicepoint_csbindgen_consumes: bit_vec /// servicepoint_csbindgen_consumes: bit_vec
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Command BitmapLinearOr(nuint offset, BitVec bit_vec, CompressionCode compression) public static Command BitmapLinearOr(nuint offset, BitVec bit_vec, CompressionCode compression)
{ {
return new Command(Command.sp_command_bitmap_linear_or(offset, bit_vec.Into(), compression)); return new Command(Command.sp_command_bitmap_linear_or(offset, bit_vec.Into(), compression));
@ -306,6 +316,7 @@ namespace ServicePoint
/// ///
/// servicepoint_csbindgen_consumes: bit_vec /// servicepoint_csbindgen_consumes: bit_vec
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Command BitmapLinearXor(nuint offset, BitVec bit_vec, CompressionCode compression) public static Command BitmapLinearXor(nuint offset, BitVec bit_vec, CompressionCode compression)
{ {
return new Command(Command.sp_command_bitmap_linear_xor(offset, bit_vec.Into(), compression)); return new Command(Command.sp_command_bitmap_linear_xor(offset, bit_vec.Into(), compression));
@ -333,6 +344,7 @@ namespace ServicePoint
/// ///
/// servicepoint_csbindgen_consumes: grid /// servicepoint_csbindgen_consumes: grid
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Command Cp437Data(nuint x, nuint y, Cp437Grid grid) public static Command Cp437Data(nuint x, nuint y, Cp437Grid grid)
{ {
return new Command(Command.sp_command_cp437_data(x, y, grid.Into())); return new Command(Command.sp_command_cp437_data(x, y, grid.Into()));
@ -362,6 +374,7 @@ namespace ServicePoint
/// ///
/// servicepoint_csbindgen_consumes: bitmap /// servicepoint_csbindgen_consumes: bitmap
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Command BitmapLinearWin(nuint x, nuint y, Bitmap bitmap, CompressionCode compression_code) public static Command BitmapLinearWin(nuint x, nuint y, Bitmap bitmap, CompressionCode compression_code)
{ {
return new Command(Command.sp_command_bitmap_linear_win(x, y, bitmap.Into(), compression_code)); return new Command(Command.sp_command_bitmap_linear_win(x, y, bitmap.Into(), compression_code));

View file

@ -30,6 +30,7 @@ namespace ServicePoint
/// - the returned instance is freed in some way, either by using a consuming function or /// - the returned instance is freed in some way, either by using a consuming function or
/// by explicitly calling `sp_connection_free`. /// by explicitly calling `sp_connection_free`.
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Connection? Open(byte* host) public static Connection? Open(byte* host)
{ {
var native = Connection.sp_connection_open(host); var native = Connection.sp_connection_open(host);
@ -58,6 +59,7 @@ namespace ServicePoint
/// ///
/// servicepoint_csbindgen_consumes: packet /// servicepoint_csbindgen_consumes: packet
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public bool SendPacket(Packet packet) public bool SendPacket(Packet packet)
{ {
return Connection.sp_connection_send_packet(this.Instance, packet.Into()); return Connection.sp_connection_send_packet(this.Instance, packet.Into());
@ -85,6 +87,7 @@ namespace ServicePoint
/// ///
/// servicepoint_csbindgen_consumes: packet /// servicepoint_csbindgen_consumes: packet
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public bool SendCommand(Command command) public bool SendCommand(Command command)
{ {
return Connection.sp_connection_send_command(this.Instance, command.Instance); return Connection.sp_connection_send_command(this.Instance, command.Instance);

View file

@ -47,6 +47,7 @@ namespace ServicePoint
/// - the returned instance is freed in some way, either by using a consuming function or /// - the returned instance is freed in some way, either by using a consuming function or
/// by explicitly calling `sp_cp437_grid_free`. /// by explicitly calling `sp_cp437_grid_free`.
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Cp437Grid Load(nuint width, nuint height, byte* data, nuint data_length) public static Cp437Grid Load(nuint width, nuint height, byte* data, nuint data_length)
{ {
return new Cp437Grid(Cp437Grid.sp_cp437_grid_load(width, height, data, data_length)); return new Cp437Grid(Cp437Grid.sp_cp437_grid_load(width, height, data, data_length));
@ -70,6 +71,7 @@ namespace ServicePoint
/// - the returned instance is freed in some way, either by using a consuming function or /// - the returned instance is freed in some way, either by using a consuming function or
/// by explicitly calling `sp_cp437_grid_free`. /// by explicitly calling `sp_cp437_grid_free`.
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public Cp437Grid Clone() public Cp437Grid Clone()
{ {
return new Cp437Grid(Cp437Grid.sp_cp437_grid_clone(this.Instance)); return new Cp437Grid(Cp437Grid.sp_cp437_grid_clone(this.Instance));
@ -95,6 +97,7 @@ namespace ServicePoint
/// - `cp437_grid` points to a valid [SPCp437Grid] /// - `cp437_grid` points to a valid [SPCp437Grid]
/// - `cp437_grid` is not written to concurrently /// - `cp437_grid` is not written to concurrently
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public byte Get(nuint x, nuint y) public byte Get(nuint x, nuint y)
{ {
return Cp437Grid.sp_cp437_grid_get(this.Instance, x, y); return Cp437Grid.sp_cp437_grid_get(this.Instance, x, y);
@ -123,6 +126,7 @@ namespace ServicePoint
/// - `cp437_grid` points to a valid [SPBitVec] /// - `cp437_grid` points to a valid [SPBitVec]
/// - `cp437_grid` is not written to or read from concurrently /// - `cp437_grid` is not written to or read from concurrently
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Set(nuint x, nuint y, byte value) public void Set(nuint x, nuint y, byte value)
{ {
Cp437Grid.sp_cp437_grid_set(this.Instance, x, y, value); Cp437Grid.sp_cp437_grid_set(this.Instance, x, y, value);
@ -147,6 +151,7 @@ namespace ServicePoint
/// - `cp437_grid` points to a valid [SPCp437Grid] /// - `cp437_grid` points to a valid [SPCp437Grid]
/// - `cp437_grid` is not written to or read from concurrently /// - `cp437_grid` is not written to or read from concurrently
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Fill(byte value) public void Fill(byte value)
{ {
Cp437Grid.sp_cp437_grid_fill(this.Instance, value); Cp437Grid.sp_cp437_grid_fill(this.Instance, value);
@ -169,6 +174,7 @@ namespace ServicePoint
/// ///
/// - `cp437_grid` points to a valid [SPCp437Grid] /// - `cp437_grid` points to a valid [SPCp437Grid]
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint Width() public nuint Width()
{ {
return Cp437Grid.sp_cp437_grid_width(this.Instance); return Cp437Grid.sp_cp437_grid_width(this.Instance);
@ -191,6 +197,7 @@ namespace ServicePoint
/// ///
/// - `cp437_grid` points to a valid [SPCp437Grid] /// - `cp437_grid` points to a valid [SPCp437Grid]
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint Height() public nuint Height()
{ {
return Cp437Grid.sp_cp437_grid_height(this.Instance); return Cp437Grid.sp_cp437_grid_height(this.Instance);
@ -213,6 +220,7 @@ namespace ServicePoint
/// - the returned memory range is never accessed after the passed [SPCp437Grid] has been freed /// - the returned memory range is never accessed after the passed [SPCp437Grid] has been freed
/// - the returned memory range is never accessed concurrently, either via the [SPCp437Grid] or directly /// - the returned memory range is never accessed concurrently, either via the [SPCp437Grid] or directly
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public SPByteSlice UnsafeDataRef() public SPByteSlice UnsafeDataRef()
{ {
return Cp437Grid.sp_cp437_grid_unsafe_data_ref(this.Instance); return Cp437Grid.sp_cp437_grid_unsafe_data_ref(this.Instance);

View file

@ -35,6 +35,7 @@ namespace ServicePoint
/// ///
/// servicepoint_csbindgen_consumes: command /// servicepoint_csbindgen_consumes: command
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Packet FromCommand(Command command) public static Packet FromCommand(Command command)
{ {
return new Packet(Packet.sp_packet_from_command(command.Into())); return new Packet(Packet.sp_packet_from_command(command.Into()));
@ -58,6 +59,7 @@ namespace ServicePoint
/// - the returned [SPPacket] instance is freed in some way, either by using a consuming function or /// - the returned [SPPacket] instance is freed in some way, either by using a consuming function or
/// by explicitly calling `sp_packet_free`. /// by explicitly calling `sp_packet_free`.
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Packet? TryLoad(byte* data, nuint length) public static Packet? TryLoad(byte* data, nuint length)
{ {
var native = Packet.sp_packet_try_load(data, length); var native = Packet.sp_packet_try_load(data, length);
@ -82,6 +84,7 @@ namespace ServicePoint
/// - the returned instance is freed in some way, either by using a consuming function or /// - the returned instance is freed in some way, either by using a consuming function or
/// by explicitly calling `sp_packet_free`. /// by explicitly calling `sp_packet_free`.
/// </summary> /// </summary>
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public Packet Clone() public Packet Clone()
{ {
return new Packet(Packet.sp_packet_clone(this.Instance)); return new Packet(Packet.sp_packet_clone(this.Instance));

@ -1 +1 @@
Subproject commit de49df92fa878f0c6685d05ee42f36e3b7d9b042 Subproject commit 0442727088f0a2b165eddde446cc7be3461cc68b