mirror of
https://github.com/cccb/servicepoint.git
synced 2025-01-18 10:00:14 +01:00
add AggressiveInlining attribute
This commit is contained in:
parent
f968f92917
commit
0b80ce4968
1
.gitmodules
vendored
1
.gitmodules
vendored
|
@ -1,3 +1,4 @@
|
|||
[submodule "crates/servicepoint_csbindgen"]
|
||||
path = crates/servicepoint_csbindgen
|
||||
url = https://github.com/kaesaecracker/servicepoint_csbindgen.git
|
||||
branch = "main"
|
||||
|
|
|
@ -54,6 +54,7 @@ namespace ServicePoint
|
|||
/// - the returned instance is freed in some way, either by using a consuming function or
|
||||
/// by explicitly calling `sp_bitvec_free`.
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public static BitVec Load(byte* data, nuint 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
|
||||
/// by explicitly calling `sp_bitvec_free`.
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public BitVec Clone()
|
||||
{
|
||||
return new BitVec(BitVec.sp_bitvec_clone(this.Instance));
|
||||
|
@ -104,6 +106,7 @@ namespace ServicePoint
|
|||
/// - `bit_vec` points to a valid [SPBitVec]
|
||||
/// - `bit_vec` is not written to concurrently
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public bool Get(nuint index)
|
||||
{
|
||||
return BitVec.sp_bitvec_get(this.Instance, index);
|
||||
|
@ -130,6 +133,7 @@ namespace ServicePoint
|
|||
/// - `bit_vec` points to a valid [SPBitVec]
|
||||
/// - `bit_vec` is not written to or read from concurrently
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public void Set(nuint index, bool value)
|
||||
{
|
||||
BitVec.sp_bitvec_set(this.Instance, index, value);
|
||||
|
@ -154,6 +158,7 @@ namespace ServicePoint
|
|||
/// - `bit_vec` points to a valid [SPBitVec]
|
||||
/// - `bit_vec` is not written to or read from concurrently
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public void Fill(bool value)
|
||||
{
|
||||
BitVec.sp_bitvec_fill(this.Instance, value);
|
||||
|
@ -176,6 +181,7 @@ namespace ServicePoint
|
|||
///
|
||||
/// - `bit_vec` points to a valid [SPBitVec]
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public nuint Len()
|
||||
{
|
||||
return BitVec.sp_bitvec_len(this.Instance);
|
||||
|
@ -198,6 +204,7 @@ namespace ServicePoint
|
|||
///
|
||||
/// - `bit_vec` points to a valid [SPBitVec]
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public bool IsEmpty()
|
||||
{
|
||||
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 concurrently, either via the [SPBitVec] or directly
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public SPByteSlice UnsafeDataRef()
|
||||
{
|
||||
return BitVec.sp_bitvec_unsafe_data_ref(this.Instance);
|
||||
|
|
|
@ -61,6 +61,7 @@ namespace ServicePoint
|
|||
/// - the returned instance is freed in some way, either by using a consuming function or
|
||||
/// by explicitly calling `sp_bitmap_free`.
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
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));
|
||||
|
@ -84,6 +85,7 @@ namespace ServicePoint
|
|||
/// - the returned instance is freed in some way, either by using a consuming function or
|
||||
/// by explicitly calling `sp_bitmap_free`.
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public Bitmap Clone()
|
||||
{
|
||||
return new Bitmap(Bitmap.sp_bitmap_clone(this.Instance));
|
||||
|
@ -109,6 +111,7 @@ namespace ServicePoint
|
|||
/// - `bitmap` points to a valid [SPBitmap]
|
||||
/// - `bitmap` is not written to concurrently
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public bool Get(nuint x, nuint y)
|
||||
{
|
||||
return Bitmap.sp_bitmap_get(this.Instance, x, y);
|
||||
|
@ -137,6 +140,7 @@ namespace ServicePoint
|
|||
/// - `bitmap` points to a valid [SPBitmap]
|
||||
/// - `bitmap` is not written to or read from concurrently
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public void Set(nuint x, nuint y, bool value)
|
||||
{
|
||||
Bitmap.sp_bitmap_set(this.Instance, x, y, value);
|
||||
|
@ -161,6 +165,7 @@ namespace ServicePoint
|
|||
/// - `bitmap` points to a valid [SPBitmap]
|
||||
/// - `bitmap` is not written to or read from concurrently
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public void Fill(bool value)
|
||||
{
|
||||
Bitmap.sp_bitmap_fill(this.Instance, value);
|
||||
|
@ -183,6 +188,7 @@ namespace ServicePoint
|
|||
///
|
||||
/// - `bitmap` points to a valid [SPBitmap]
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public nuint Width()
|
||||
{
|
||||
return Bitmap.sp_bitmap_width(this.Instance);
|
||||
|
@ -205,6 +211,7 @@ namespace ServicePoint
|
|||
///
|
||||
/// - `bitmap` points to a valid [SPBitmap]
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public nuint Height()
|
||||
{
|
||||
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 concurrently, either via the [SPBitmap] or directly
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public SPByteSlice UnsafeDataRef()
|
||||
{
|
||||
return Bitmap.sp_bitmap_unsafe_data_ref(this.Instance);
|
||||
|
|
|
@ -47,6 +47,7 @@ namespace ServicePoint
|
|||
/// - the returned instance is freed in some way, either by using a consuming function or
|
||||
/// by explicitly calling `sp_brightness_grid_free`.
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
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));
|
||||
|
@ -74,6 +75,7 @@ namespace ServicePoint
|
|||
/// - the returned instance is freed in some way, either by using a consuming function or
|
||||
/// by explicitly calling `sp_brightness_grid_free`.
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public BrightnessGrid Clone()
|
||||
{
|
||||
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` is not written to concurrently
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public byte Get(nuint x, nuint 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` is not written to or read from concurrently
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public void Set(nuint x, nuint y, byte 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` is not written to or read from concurrently
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public void Fill(byte value)
|
||||
{
|
||||
BrightnessGrid.sp_brightness_grid_fill(this.Instance, value);
|
||||
|
@ -179,6 +184,7 @@ namespace ServicePoint
|
|||
///
|
||||
/// - `brightness_grid` points to a valid [SPBrightnessGrid]
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public nuint Width()
|
||||
{
|
||||
return BrightnessGrid.sp_brightness_grid_width(this.Instance);
|
||||
|
@ -203,6 +209,7 @@ namespace ServicePoint
|
|||
///
|
||||
/// - `brightness_grid` points to a valid [SPBrightnessGrid]
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public nuint Height()
|
||||
{
|
||||
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 concurrently, either via the [SPBrightnessGrid] or directly
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public SPByteSlice UnsafeDataRef()
|
||||
{
|
||||
return BrightnessGrid.sp_brightness_grid_unsafe_data_ref(this.Instance);
|
||||
|
|
|
@ -37,6 +37,7 @@ namespace ServicePoint
|
|||
///
|
||||
/// servicepoint_csbindgen_consumes: packet
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public static Command? TryFromPacket(Packet packet)
|
||||
{
|
||||
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
|
||||
/// by explicitly calling `sp_command_free`.
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public Command Clone()
|
||||
{
|
||||
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
|
||||
/// by explicitly calling `sp_command_free`.
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public static 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
|
||||
/// by explicitly calling `sp_command_free`.
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public static Command HardReset()
|
||||
{
|
||||
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
|
||||
/// by explicitly calling `sp_command_free`.
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public static Command FadeOut()
|
||||
{
|
||||
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
|
||||
/// by explicitly calling `sp_command_free`.
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public static Command Brightness(byte brightness)
|
||||
{
|
||||
return new Command(Command.sp_command_brightness(brightness));
|
||||
|
@ -170,6 +176,7 @@ namespace ServicePoint
|
|||
///
|
||||
/// servicepoint_csbindgen_consumes: grid
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public static Command CharBrightness(nuint x, nuint y, BrightnessGrid grid)
|
||||
{
|
||||
return new Command(Command.sp_command_char_brightness(x, y, grid.Into()));
|
||||
|
@ -204,6 +211,7 @@ namespace ServicePoint
|
|||
///
|
||||
/// servicepoint_csbindgen_consumes: bit_vec
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public static Command BitmapLinear(nuint offset, BitVec bit_vec, CompressionCode 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
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
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));
|
||||
|
@ -272,6 +281,7 @@ namespace ServicePoint
|
|||
///
|
||||
/// servicepoint_csbindgen_consumes: bit_vec
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
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));
|
||||
|
@ -306,6 +316,7 @@ namespace ServicePoint
|
|||
///
|
||||
/// servicepoint_csbindgen_consumes: bit_vec
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
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));
|
||||
|
@ -333,6 +344,7 @@ namespace ServicePoint
|
|||
///
|
||||
/// servicepoint_csbindgen_consumes: grid
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public static Command Cp437Data(nuint x, nuint y, Cp437Grid grid)
|
||||
{
|
||||
return new Command(Command.sp_command_cp437_data(x, y, grid.Into()));
|
||||
|
@ -362,6 +374,7 @@ namespace ServicePoint
|
|||
///
|
||||
/// servicepoint_csbindgen_consumes: bitmap
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
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));
|
||||
|
|
|
@ -30,6 +30,7 @@ namespace ServicePoint
|
|||
/// - the returned instance is freed in some way, either by using a consuming function or
|
||||
/// by explicitly calling `sp_connection_free`.
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public static Connection? Open(byte* host)
|
||||
{
|
||||
var native = Connection.sp_connection_open(host);
|
||||
|
@ -58,6 +59,7 @@ namespace ServicePoint
|
|||
///
|
||||
/// servicepoint_csbindgen_consumes: packet
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public bool SendPacket(Packet packet)
|
||||
{
|
||||
return Connection.sp_connection_send_packet(this.Instance, packet.Into());
|
||||
|
@ -85,6 +87,7 @@ namespace ServicePoint
|
|||
///
|
||||
/// servicepoint_csbindgen_consumes: packet
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public bool SendCommand(Command command)
|
||||
{
|
||||
return Connection.sp_connection_send_command(this.Instance, command.Instance);
|
||||
|
|
|
@ -47,6 +47,7 @@ namespace ServicePoint
|
|||
/// - the returned instance is freed in some way, either by using a consuming function or
|
||||
/// by explicitly calling `sp_cp437_grid_free`.
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
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));
|
||||
|
@ -70,6 +71,7 @@ namespace ServicePoint
|
|||
/// - the returned instance is freed in some way, either by using a consuming function or
|
||||
/// by explicitly calling `sp_cp437_grid_free`.
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public Cp437Grid Clone()
|
||||
{
|
||||
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` is not written to concurrently
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public byte Get(nuint x, nuint 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` is not written to or read from concurrently
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public void Set(nuint x, nuint y, byte 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` is not written to or read from concurrently
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public void Fill(byte value)
|
||||
{
|
||||
Cp437Grid.sp_cp437_grid_fill(this.Instance, value);
|
||||
|
@ -169,6 +174,7 @@ namespace ServicePoint
|
|||
///
|
||||
/// - `cp437_grid` points to a valid [SPCp437Grid]
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public nuint Width()
|
||||
{
|
||||
return Cp437Grid.sp_cp437_grid_width(this.Instance);
|
||||
|
@ -191,6 +197,7 @@ namespace ServicePoint
|
|||
///
|
||||
/// - `cp437_grid` points to a valid [SPCp437Grid]
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public nuint Height()
|
||||
{
|
||||
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 concurrently, either via the [SPCp437Grid] or directly
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public SPByteSlice UnsafeDataRef()
|
||||
{
|
||||
return Cp437Grid.sp_cp437_grid_unsafe_data_ref(this.Instance);
|
||||
|
|
|
@ -35,6 +35,7 @@ namespace ServicePoint
|
|||
///
|
||||
/// servicepoint_csbindgen_consumes: command
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public static Packet FromCommand(Command command)
|
||||
{
|
||||
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
|
||||
/// by explicitly calling `sp_packet_free`.
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public static Packet? TryLoad(byte* data, nuint 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
|
||||
/// by explicitly calling `sp_packet_free`.
|
||||
/// </summary>
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public Packet Clone()
|
||||
{
|
||||
return new Packet(Packet.sp_packet_clone(this.Instance));
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit de49df92fa878f0c6685d05ee42f36e3b7d9b042
|
||||
Subproject commit 0442727088f0a2b165eddde446cc7be3461cc68b
|
Loading…
Reference in a new issue