@@ -147,17 +147,17 @@ public void SetElement(uint index, object? value)
147147 {
148148 var v = Value . FromObject ( store , value , Kind ) ;
149149
150- try
150+ try
151151 {
152152 var error = Native . wasmtime_table_set ( store . Context . handle , this . table , index , v ) ;
153- GC . KeepAlive ( store ) ;
153+ GC . KeepAlive ( store ) ;
154154
155155 if ( error != IntPtr . Zero )
156156 {
157157 throw WasmtimeException . FromOwnedError ( error ) ;
158158 }
159159 }
160- finally
160+ finally
161161 {
162162 v . Release ( store ) ;
163163 }
@@ -167,7 +167,7 @@ public void SetElement(uint index, object? value)
167167 /// Gets the current size of the table.
168168 /// </summary>
169169 /// <value>Returns the current size of the table.</value>
170- public uint GetSize ( )
170+ public ulong GetSize ( )
171171 {
172172 var result = Native . wasmtime_table_size ( store . Context . handle , this . table ) ;
173173 GC . KeepAlive ( store ) ;
@@ -180,14 +180,14 @@ public uint GetSize()
180180 /// <param name="delta">The number of elements to grow the table.</param>
181181 /// <param name="initialValue">The initial value for the new elements.</param>
182182 /// <returns>Returns the previous number of elements in the table.</returns>
183- public uint Grow ( uint delta , object ? initialValue )
183+ public ulong Grow ( uint delta , object ? initialValue )
184184 {
185185 var v = Value . FromObject ( store , initialValue , Kind ) ;
186186
187187 try
188188 {
189189 var error = Native . wasmtime_table_grow ( store . Context . handle , this . table , delta , v , out var prev ) ;
190- GC . KeepAlive ( store ) ;
190+ GC . KeepAlive ( store ) ;
191191
192192 if ( error != IntPtr . Zero )
193193 {
@@ -261,16 +261,16 @@ internal struct Limits
261261
262262 [ DllImport ( Engine . LibraryName ) ]
263263 [ return : MarshalAs ( UnmanagedType . I1 ) ]
264- public static extern bool wasmtime_table_get ( IntPtr context , in ExternTable table , uint index , out Value val ) ;
264+ public static extern bool wasmtime_table_get ( IntPtr context , in ExternTable table , ulong index , out Value val ) ;
265265
266266 [ DllImport ( Engine . LibraryName ) ]
267- public static extern IntPtr wasmtime_table_set ( IntPtr context , in ExternTable table , uint index , in Value val ) ;
267+ public static extern IntPtr wasmtime_table_set ( IntPtr context , in ExternTable table , ulong index , in Value val ) ;
268268
269269 [ DllImport ( Engine . LibraryName ) ]
270- public static extern uint wasmtime_table_size ( IntPtr context , in ExternTable table ) ;
270+ public static extern ulong wasmtime_table_size ( IntPtr context , in ExternTable table ) ;
271271
272272 [ DllImport ( Engine . LibraryName ) ]
273- public static extern IntPtr wasmtime_table_grow ( IntPtr context , in ExternTable table , uint delta , in Value value , out uint prev ) ;
273+ public static extern IntPtr wasmtime_table_grow ( IntPtr context , in ExternTable table , ulong delta , in Value value , out ulong prev ) ;
274274
275275 [ DllImport ( Engine . LibraryName ) ]
276276 public static extern IntPtr wasmtime_table_type ( IntPtr context , in ExternTable table ) ;
0 commit comments