Browse Source

Minor changes of data types

nxrighthere 7 years ago
parent
commit
0b5a5af3df
2 changed files with 6 additions and 6 deletions
  1. 3 3
      Source/Managed/ENet.cs
  2. 3 3
      Source/Native/enet.h

+ 3 - 3
Source/Managed/ENet.cs

@@ -89,7 +89,7 @@ namespace ENet {
 
 	internal static class ArrayPool {
 		[ThreadStatic]
-		static byte[] buffer = null;
+		private static byte[] buffer = null;
 
 		public static byte[] GetBuffer() {
 			if (buffer == null)
@@ -220,7 +220,7 @@ namespace ENet {
 			}
 		}
 
-		public int Length {
+		public uint Length {
 			get {
 				CheckCreated();
 
@@ -715,7 +715,7 @@ namespace ENet {
 		internal static extern IntPtr enet_packet_get_data(IntPtr packet);
 
 		[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
-		internal static extern int enet_packet_get_length(IntPtr packet);
+		internal static extern uint enet_packet_get_length(IntPtr packet);
 
 		[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
 		internal static extern void enet_packet_destroy(IntPtr packet);

+ 3 - 3
Source/Native/enet.h

@@ -917,7 +917,7 @@ extern "C" {
 
     /* Extended API for easier binding in other programming languages */
     ENET_API void *              enet_packet_get_data (ENetPacket *);
-    ENET_API int                 enet_packet_get_length (ENetPacket *);
+    ENET_API enet_uint32         enet_packet_get_length (ENetPacket *);
 
     ENET_API enet_uint32         enet_host_get_peers_count (ENetHost *);
     ENET_API enet_uint32         enet_host_get_packets_sent (ENetHost *);
@@ -4739,7 +4739,7 @@ extern "C" {
         return (void *) packet->data;
     }
 
-    int enet_packet_get_length(ENetPacket *packet) {
+    enet_uint32 enet_packet_get_length(ENetPacket *packet) {
         return packet->dataLength;
     }
 
@@ -5765,4 +5765,4 @@ extern "C" {
 #endif
 
 #endif // ENET_IMPLEMENTATION
-#endif // ENET_INCLUDE_H
+#endif // ENET_INCLUDE_H