From 240766dc11760ca8aea534d22bf9edae413fcba8 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 20 Oct 2024 12:08:19 +0200 Subject: [PATCH] add dunder to prevent name clashes --- .../servicepoint_binding_c/src/connection.rs | 6 ++-- .../servicepoint_binding_c/src/constants.rs | 2 +- .../ServicePoint/BitVec.g.cs | 28 ++++++++-------- .../ServicePoint/Bitmap.g.cs | 28 ++++++++-------- .../ServicePoint/BrightnessGrid.g.cs | 28 ++++++++-------- .../ServicePoint/Command.g.cs | 32 +++++++++---------- .../ServicePoint/Connection.g.cs | 22 ++++++------- .../ServicePoint/Cp437Grid.g.cs | 28 ++++++++-------- .../ServicePoint/Packet.g.cs | 18 +++++------ crates/servicepoint_csbindgen | 2 +- 10 files changed, 97 insertions(+), 97 deletions(-) diff --git a/crates/servicepoint_binding_c/src/connection.rs b/crates/servicepoint_binding_c/src/connection.rs index 4472b8e..6edb804 100644 --- a/crates/servicepoint_binding_c/src/connection.rs +++ b/crates/servicepoint_binding_c/src/connection.rs @@ -3,7 +3,7 @@ //! prefix `sp_connection_` use std::ffi::{c_char, CStr}; -use std::ptr::null_mut; +use std::ptr::{null_mut, NonNull}; use crate::{SPCommand, SPPacket}; @@ -18,7 +18,7 @@ use crate::{SPCommand, SPPacket}; /// ``` pub struct SPConnection(pub(crate) servicepoint::Connection); -/// Creates a new instance of [SPConnection]. +/// Creates a new instance of [SPConnection] that uses UDP to send. /// /// returns: NULL if connection fails, or connected instance /// @@ -96,7 +96,7 @@ pub unsafe extern "C" fn sp_connection_send_packet( /// - `command` points to a valid instance of [SPPacket] /// - `command` is not used concurrently or after this call /// -/// servicepoint_csbindgen_consumes: packet +/// servicepoint_csbindgen_consumes: command #[no_mangle] pub unsafe extern "C" fn sp_connection_send_command( connection: *const SPConnection, diff --git a/crates/servicepoint_binding_c/src/constants.rs b/crates/servicepoint_binding_c/src/constants.rs index ac30e59..efd3944 100644 --- a/crates/servicepoint_binding_c/src/constants.rs +++ b/crates/servicepoint_binding_c/src/constants.rs @@ -1,6 +1,6 @@ //! re-exported constants for use in C -use servicepoint::{CompressionCode}; +use servicepoint::CompressionCode; use std::time::Duration; /// size of a single tile in one dimension diff --git a/crates/servicepoint_binding_cs/ServicePoint/BitVec.g.cs b/crates/servicepoint_binding_cs/ServicePoint/BitVec.g.cs index 516ff95..7cbc77c 100644 --- a/crates/servicepoint_binding_cs/ServicePoint/BitVec.g.cs +++ b/crates/servicepoint_binding_cs/ServicePoint/BitVec.g.cs @@ -81,7 +81,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public BitVec Clone() { - return new BitVec(BitVec.sp_bitvec_clone(this.Instance)); + return new BitVec(BitVec.sp_bitvec_clone(this.__Instance)); } /// @@ -109,7 +109,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public bool Get(nuint index) { - return BitVec.sp_bitvec_get(this.Instance, index); + return BitVec.sp_bitvec_get(this.__Instance, index); } /// @@ -136,7 +136,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public void Set(nuint index, bool value) { - BitVec.sp_bitvec_set(this.Instance, index, value); + BitVec.sp_bitvec_set(this.__Instance, index, value); } /// @@ -161,7 +161,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public void Fill(bool value) { - BitVec.sp_bitvec_fill(this.Instance, value); + BitVec.sp_bitvec_fill(this.__Instance, value); } /// @@ -184,7 +184,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public nuint Len() { - return BitVec.sp_bitvec_len(this.Instance); + return BitVec.sp_bitvec_len(this.__Instance); } /// @@ -207,7 +207,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public bool IsEmpty() { - return BitVec.sp_bitvec_is_empty(this.Instance); + return BitVec.sp_bitvec_is_empty(this.__Instance); } /// @@ -232,13 +232,13 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public SPByteSlice UnsafeDataRef() { - return BitVec.sp_bitvec_unsafe_data_ref(this.Instance); + return BitVec.sp_bitvec_unsafe_data_ref(this.__Instance); } #region internal machinery private SPBitVec* _instance; - internal SPBitVec* Instance + internal SPBitVec* __Instance { get { @@ -254,26 +254,26 @@ namespace ServicePoint _instance = instance; } - internal SPBitVec* Into() + internal SPBitVec* __Into() { - var instance = Instance; + var instance = __Instance; _instance = null; return instance; } - private void Free() + private void __Free() { if (_instance != null) - BitVec.sp_bitvec_free(Into()); + BitVec.sp_bitvec_free(__Into()); } public void Dispose() { - Free(); + __Free(); GC.SuppressFinalize(this); } - ~BitVec() => Free(); + ~BitVec() => __Free(); #endregion diff --git a/crates/servicepoint_binding_cs/ServicePoint/Bitmap.g.cs b/crates/servicepoint_binding_cs/ServicePoint/Bitmap.g.cs index a88dd57..6f9e81b 100644 --- a/crates/servicepoint_binding_cs/ServicePoint/Bitmap.g.cs +++ b/crates/servicepoint_binding_cs/ServicePoint/Bitmap.g.cs @@ -88,7 +88,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public Bitmap Clone() { - return new Bitmap(Bitmap.sp_bitmap_clone(this.Instance)); + return new Bitmap(Bitmap.sp_bitmap_clone(this.__Instance)); } /// @@ -114,7 +114,7 @@ namespace ServicePoint [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); + return Bitmap.sp_bitmap_get(this.__Instance, x, y); } /// @@ -143,7 +143,7 @@ namespace ServicePoint [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); + Bitmap.sp_bitmap_set(this.__Instance, x, y, value); } /// @@ -168,7 +168,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public void Fill(bool value) { - Bitmap.sp_bitmap_fill(this.Instance, value); + Bitmap.sp_bitmap_fill(this.__Instance, value); } /// @@ -191,7 +191,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public nuint Width() { - return Bitmap.sp_bitmap_width(this.Instance); + return Bitmap.sp_bitmap_width(this.__Instance); } /// @@ -214,7 +214,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public nuint Height() { - return Bitmap.sp_bitmap_height(this.Instance); + return Bitmap.sp_bitmap_height(this.__Instance); } /// @@ -235,13 +235,13 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public SPByteSlice UnsafeDataRef() { - return Bitmap.sp_bitmap_unsafe_data_ref(this.Instance); + return Bitmap.sp_bitmap_unsafe_data_ref(this.__Instance); } #region internal machinery private SPBitmap* _instance; - internal SPBitmap* Instance + internal SPBitmap* __Instance { get { @@ -257,26 +257,26 @@ namespace ServicePoint _instance = instance; } - internal SPBitmap* Into() + internal SPBitmap* __Into() { - var instance = Instance; + var instance = __Instance; _instance = null; return instance; } - private void Free() + private void __Free() { if (_instance != null) - Bitmap.sp_bitmap_free(Into()); + Bitmap.sp_bitmap_free(__Into()); } public void Dispose() { - Free(); + __Free(); GC.SuppressFinalize(this); } - ~Bitmap() => Free(); + ~Bitmap() => __Free(); #endregion diff --git a/crates/servicepoint_binding_cs/ServicePoint/BrightnessGrid.g.cs b/crates/servicepoint_binding_cs/ServicePoint/BrightnessGrid.g.cs index a32385f..a46f981 100644 --- a/crates/servicepoint_binding_cs/ServicePoint/BrightnessGrid.g.cs +++ b/crates/servicepoint_binding_cs/ServicePoint/BrightnessGrid.g.cs @@ -78,7 +78,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public BrightnessGrid Clone() { - return new BrightnessGrid(BrightnessGrid.sp_brightness_grid_clone(this.Instance)); + return new BrightnessGrid(BrightnessGrid.sp_brightness_grid_clone(this.__Instance)); } /// @@ -106,7 +106,7 @@ namespace ServicePoint [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); + return BrightnessGrid.sp_brightness_grid_get(this.__Instance, x, y); } /// @@ -136,7 +136,7 @@ namespace ServicePoint [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); + BrightnessGrid.sp_brightness_grid_set(this.__Instance, x, y, value); } /// @@ -162,7 +162,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public void Fill(byte value) { - BrightnessGrid.sp_brightness_grid_fill(this.Instance, value); + BrightnessGrid.sp_brightness_grid_fill(this.__Instance, value); } /// @@ -187,7 +187,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public nuint Width() { - return BrightnessGrid.sp_brightness_grid_width(this.Instance); + return BrightnessGrid.sp_brightness_grid_width(this.__Instance); } /// @@ -212,7 +212,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public nuint Height() { - return BrightnessGrid.sp_brightness_grid_height(this.Instance); + return BrightnessGrid.sp_brightness_grid_height(this.__Instance); } /// @@ -239,13 +239,13 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public SPByteSlice UnsafeDataRef() { - return BrightnessGrid.sp_brightness_grid_unsafe_data_ref(this.Instance); + return BrightnessGrid.sp_brightness_grid_unsafe_data_ref(this.__Instance); } #region internal machinery private SPBrightnessGrid* _instance; - internal SPBrightnessGrid* Instance + internal SPBrightnessGrid* __Instance { get { @@ -261,26 +261,26 @@ namespace ServicePoint _instance = instance; } - internal SPBrightnessGrid* Into() + internal SPBrightnessGrid* __Into() { - var instance = Instance; + var instance = __Instance; _instance = null; return instance; } - private void Free() + private void __Free() { if (_instance != null) - BrightnessGrid.sp_brightness_grid_free(Into()); + BrightnessGrid.sp_brightness_grid_free(__Into()); } public void Dispose() { - Free(); + __Free(); GC.SuppressFinalize(this); } - ~BrightnessGrid() => Free(); + ~BrightnessGrid() => __Free(); #endregion diff --git a/crates/servicepoint_binding_cs/ServicePoint/Command.g.cs b/crates/servicepoint_binding_cs/ServicePoint/Command.g.cs index b5d9e3e..3055103 100644 --- a/crates/servicepoint_binding_cs/ServicePoint/Command.g.cs +++ b/crates/servicepoint_binding_cs/ServicePoint/Command.g.cs @@ -40,7 +40,7 @@ namespace ServicePoint [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()); + var native = Command.sp_command_try_from_packet(packet.__Into()); return native == null ? null : new Command(native); } @@ -65,7 +65,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public Command Clone() { - return new Command(Command.sp_command_clone(this.Instance)); + return new Command(Command.sp_command_clone(this.__Instance)); } /// @@ -179,7 +179,7 @@ namespace ServicePoint [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())); + return new Command(Command.sp_command_char_brightness(x, y, grid.__Into())); } /// @@ -214,7 +214,7 @@ namespace ServicePoint [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)); + return new Command(Command.sp_command_bitmap_linear(offset, bit_vec.__Into(), compression)); } /// @@ -249,7 +249,7 @@ namespace ServicePoint [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)); + return new Command(Command.sp_command_bitmap_linear_and(offset, bit_vec.__Into(), compression)); } /// @@ -284,7 +284,7 @@ namespace ServicePoint [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)); + return new Command(Command.sp_command_bitmap_linear_or(offset, bit_vec.__Into(), compression)); } /// @@ -319,7 +319,7 @@ namespace ServicePoint [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)); + return new Command(Command.sp_command_bitmap_linear_xor(offset, bit_vec.__Into(), compression)); } /// @@ -347,7 +347,7 @@ namespace ServicePoint [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())); + return new Command(Command.sp_command_cp437_data(x, y, grid.__Into())); } /// @@ -377,13 +377,13 @@ namespace ServicePoint [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)); + return new Command(Command.sp_command_bitmap_linear_win(x, y, bitmap.__Into(), compression_code)); } #region internal machinery private SPCommand* _instance; - internal SPCommand* Instance + internal SPCommand* __Instance { get { @@ -399,26 +399,26 @@ namespace ServicePoint _instance = instance; } - internal SPCommand* Into() + internal SPCommand* __Into() { - var instance = Instance; + var instance = __Instance; _instance = null; return instance; } - private void Free() + private void __Free() { if (_instance != null) - Command.sp_command_free(Into()); + Command.sp_command_free(__Into()); } public void Dispose() { - Free(); + __Free(); GC.SuppressFinalize(this); } - ~Command() => Free(); + ~Command() => __Free(); #endregion diff --git a/crates/servicepoint_binding_cs/ServicePoint/Connection.g.cs b/crates/servicepoint_binding_cs/ServicePoint/Connection.g.cs index 10694e5..a397c89 100644 --- a/crates/servicepoint_binding_cs/ServicePoint/Connection.g.cs +++ b/crates/servicepoint_binding_cs/ServicePoint/Connection.g.cs @@ -15,7 +15,7 @@ namespace ServicePoint { #nullable enable /// - /// Creates a new instance of [SPConnection]. + /// Creates a new instance of [SPConnection] that uses UDP to send. /// /// returns: NULL if connection fails, or connected instance /// @@ -62,7 +62,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] 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,18 +85,18 @@ namespace ServicePoint /// - `command` points to a valid instance of [SPPacket] /// - `command` is not used concurrently or after this call /// - /// servicepoint_csbindgen_consumes: packet + /// servicepoint_csbindgen_consumes: command /// [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public bool SendCommand(Command command) { - return Connection.sp_connection_send_command(this.Instance, command.Instance); + return Connection.sp_connection_send_command(this.__Instance, command.__Into()); } #region internal machinery private SPConnection* _instance; - internal SPConnection* Instance + internal SPConnection* __Instance { get { @@ -112,26 +112,26 @@ namespace ServicePoint _instance = instance; } - internal SPConnection* Into() + internal SPConnection* __Into() { - var instance = Instance; + var instance = __Instance; _instance = null; return instance; } - private void Free() + private void __Free() { if (_instance != null) - Connection.sp_connection_free(Into()); + Connection.sp_connection_free(__Into()); } public void Dispose() { - Free(); + __Free(); GC.SuppressFinalize(this); } - ~Connection() => Free(); + ~Connection() => __Free(); #endregion diff --git a/crates/servicepoint_binding_cs/ServicePoint/Cp437Grid.g.cs b/crates/servicepoint_binding_cs/ServicePoint/Cp437Grid.g.cs index c7d6a95..adf084f 100644 --- a/crates/servicepoint_binding_cs/ServicePoint/Cp437Grid.g.cs +++ b/crates/servicepoint_binding_cs/ServicePoint/Cp437Grid.g.cs @@ -74,7 +74,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public Cp437Grid Clone() { - return new Cp437Grid(Cp437Grid.sp_cp437_grid_clone(this.Instance)); + return new Cp437Grid(Cp437Grid.sp_cp437_grid_clone(this.__Instance)); } /// @@ -100,7 +100,7 @@ namespace ServicePoint [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); + return Cp437Grid.sp_cp437_grid_get(this.__Instance, x, y); } /// @@ -129,7 +129,7 @@ namespace ServicePoint [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); + Cp437Grid.sp_cp437_grid_set(this.__Instance, x, y, value); } /// @@ -154,7 +154,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public void Fill(byte value) { - Cp437Grid.sp_cp437_grid_fill(this.Instance, value); + Cp437Grid.sp_cp437_grid_fill(this.__Instance, value); } /// @@ -177,7 +177,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public nuint Width() { - return Cp437Grid.sp_cp437_grid_width(this.Instance); + return Cp437Grid.sp_cp437_grid_width(this.__Instance); } /// @@ -200,7 +200,7 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public nuint Height() { - return Cp437Grid.sp_cp437_grid_height(this.Instance); + return Cp437Grid.sp_cp437_grid_height(this.__Instance); } /// @@ -223,13 +223,13 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public SPByteSlice UnsafeDataRef() { - return Cp437Grid.sp_cp437_grid_unsafe_data_ref(this.Instance); + return Cp437Grid.sp_cp437_grid_unsafe_data_ref(this.__Instance); } #region internal machinery private SPCp437Grid* _instance; - internal SPCp437Grid* Instance + internal SPCp437Grid* __Instance { get { @@ -245,26 +245,26 @@ namespace ServicePoint _instance = instance; } - internal SPCp437Grid* Into() + internal SPCp437Grid* __Into() { - var instance = Instance; + var instance = __Instance; _instance = null; return instance; } - private void Free() + private void __Free() { if (_instance != null) - Cp437Grid.sp_cp437_grid_free(Into()); + Cp437Grid.sp_cp437_grid_free(__Into()); } public void Dispose() { - Free(); + __Free(); GC.SuppressFinalize(this); } - ~Cp437Grid() => Free(); + ~Cp437Grid() => __Free(); #endregion diff --git a/crates/servicepoint_binding_cs/ServicePoint/Packet.g.cs b/crates/servicepoint_binding_cs/ServicePoint/Packet.g.cs index 8c5a2cc..76f1338 100644 --- a/crates/servicepoint_binding_cs/ServicePoint/Packet.g.cs +++ b/crates/servicepoint_binding_cs/ServicePoint/Packet.g.cs @@ -38,7 +38,7 @@ namespace ServicePoint [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())); + return new Packet(Packet.sp_packet_from_command(command.__Into())); } /// @@ -87,13 +87,13 @@ namespace ServicePoint [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public Packet Clone() { - return new Packet(Packet.sp_packet_clone(this.Instance)); + return new Packet(Packet.sp_packet_clone(this.__Instance)); } #region internal machinery private SPPacket* _instance; - internal SPPacket* Instance + internal SPPacket* __Instance { get { @@ -109,26 +109,26 @@ namespace ServicePoint _instance = instance; } - internal SPPacket* Into() + internal SPPacket* __Into() { - var instance = Instance; + var instance = __Instance; _instance = null; return instance; } - private void Free() + private void __Free() { if (_instance != null) - Packet.sp_packet_free(Into()); + Packet.sp_packet_free(__Into()); } public void Dispose() { - Free(); + __Free(); GC.SuppressFinalize(this); } - ~Packet() => Free(); + ~Packet() => __Free(); #endregion diff --git a/crates/servicepoint_csbindgen b/crates/servicepoint_csbindgen index 0442727..55eb879 160000 --- a/crates/servicepoint_csbindgen +++ b/crates/servicepoint_csbindgen @@ -1 +1 @@ -Subproject commit 0442727088f0a2b165eddde446cc7be3461cc68b +Subproject commit 55eb87936923e8fb3eb11cfc7be864c1f4833c98