@@ -147,17 +147,17 @@ public void SetElement(uint index, object? value)
147
147
{
148
148
var v = Value . FromObject ( store , value , Kind ) ;
149
149
150
- try
150
+ try
151
151
{
152
152
var error = Native . wasmtime_table_set ( store . Context . handle , this . table , index , v ) ;
153
- GC . KeepAlive ( store ) ;
153
+ GC . KeepAlive ( store ) ;
154
154
155
155
if ( error != IntPtr . Zero )
156
156
{
157
157
throw WasmtimeException . FromOwnedError ( error ) ;
158
158
}
159
159
}
160
- finally
160
+ finally
161
161
{
162
162
v . Release ( store ) ;
163
163
}
@@ -167,7 +167,7 @@ public void SetElement(uint index, object? value)
167
167
/// Gets the current size of the table.
168
168
/// </summary>
169
169
/// <value>Returns the current size of the table.</value>
170
- public uint GetSize ( )
170
+ public ulong GetSize ( )
171
171
{
172
172
var result = Native . wasmtime_table_size ( store . Context . handle , this . table ) ;
173
173
GC . KeepAlive ( store ) ;
@@ -180,14 +180,14 @@ public uint GetSize()
180
180
/// <param name="delta">The number of elements to grow the table.</param>
181
181
/// <param name="initialValue">The initial value for the new elements.</param>
182
182
/// <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 )
184
184
{
185
185
var v = Value . FromObject ( store , initialValue , Kind ) ;
186
186
187
187
try
188
188
{
189
189
var error = Native . wasmtime_table_grow ( store . Context . handle , this . table , delta , v , out var prev ) ;
190
- GC . KeepAlive ( store ) ;
190
+ GC . KeepAlive ( store ) ;
191
191
192
192
if ( error != IntPtr . Zero )
193
193
{
@@ -261,16 +261,16 @@ internal struct Limits
261
261
262
262
[ DllImport ( Engine . LibraryName ) ]
263
263
[ 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 ) ;
265
265
266
266
[ 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 ) ;
268
268
269
269
[ 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 ) ;
271
271
272
272
[ 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 ) ;
274
274
275
275
[ DllImport ( Engine . LibraryName ) ]
276
276
public static extern IntPtr wasmtime_table_type ( IntPtr context , in ExternTable table ) ;
0 commit comments