@@ -92,6 +92,7 @@ WASM_API_EXTERN void wasmtime_anyref_clone(const wasmtime_anyref_t *anyref,
9292 */
9393WASM_API_EXTERN void wasmtime_anyref_unroot (wasmtime_anyref_t * ref );
9494
95+ #ifdef WASMTIME_FEATURE_GC
9596/**
9697 * \brief Converts a raw `anyref` value coming from #wasmtime_val_raw_t into
9798 * a #wasmtime_anyref_t.
@@ -102,7 +103,9 @@ WASM_API_EXTERN void wasmtime_anyref_unroot(wasmtime_anyref_t *ref);
102103WASM_API_EXTERN void wasmtime_anyref_from_raw (wasmtime_context_t * context ,
103104 uint32_t raw ,
104105 wasmtime_anyref_t * out );
106+ #endif // WASMTIME_FEATURE_GC
105107
108+ #ifdef WASMTIME_FEATURE_GC
106109/**
107110 * \brief Converts a #wasmtime_anyref_t to a raw value suitable for storing
108111 * into a #wasmtime_val_raw_t.
@@ -115,7 +118,9 @@ WASM_API_EXTERN void wasmtime_anyref_from_raw(wasmtime_context_t *context,
115118 */
116119WASM_API_EXTERN uint32_t wasmtime_anyref_to_raw (wasmtime_context_t * context ,
117120 const wasmtime_anyref_t * ref );
121+ #endif // WASMTIME_FEATURE_GC
118122
123+ #ifdef WASMTIME_FEATURE_GC
119124/**
120125 * \brief Create a new `i31ref` value.
121126 *
@@ -127,7 +132,10 @@ WASM_API_EXTERN uint32_t wasmtime_anyref_to_raw(wasmtime_context_t *context,
127132WASM_API_EXTERN void wasmtime_anyref_from_i31 (wasmtime_context_t * context ,
128133 uint32_t i31val ,
129134 wasmtime_anyref_t * out );
135+ #endif // WASMTIME_FEATURE_GC
130136
137+
138+ #ifdef WASMTIME_FEATURE_GC
131139/**
132140 * \brief Get the `anyref`'s underlying `i31ref` value, zero extended, if any.
133141 *
@@ -140,7 +148,9 @@ WASM_API_EXTERN void wasmtime_anyref_from_i31(wasmtime_context_t *context,
140148WASM_API_EXTERN bool wasmtime_anyref_i31_get_u (wasmtime_context_t * context ,
141149 const wasmtime_anyref_t * anyref ,
142150 uint32_t * dst );
151+ #endif // WASMTIME_FEATURE_GC
143152
153+ #ifdef WASMTIME_FEATURE_GC
144154/**
145155 * \brief Get the `anyref`'s underlying `i31ref` value, sign extended, if any.
146156 *
@@ -153,6 +163,7 @@ WASM_API_EXTERN bool wasmtime_anyref_i31_get_u(wasmtime_context_t *context,
153163WASM_API_EXTERN bool wasmtime_anyref_i31_get_s (wasmtime_context_t * context ,
154164 const wasmtime_anyref_t * anyref ,
155165 int32_t * dst );
166+ #endif // WASMTIME_FEATURE_GC
156167
157168/**
158169 * \typedef wasmtime_externref_t
@@ -202,6 +213,7 @@ static inline bool wasmtime_externref_is_null(const wasmtime_externref_t *ref) {
202213 return ref -> store_id == 0 ;
203214}
204215
216+ #ifdef WASMTIME_FEATURE_GC
205217/**
206218 * \brief Create a new `externref` value.
207219 *
@@ -229,7 +241,10 @@ WASM_API_EXTERN bool wasmtime_externref_new(wasmtime_context_t *context,
229241 void * data ,
230242 void (* finalizer )(void * ),
231243 wasmtime_externref_t * out );
244+ #endif // WASMTIME_FEATURE_GC
245+
232246
247+ #ifdef WASMTIME_FEATURE_GC
233248/**
234249 * \brief Get an `externref`'s wrapped data
235250 *
@@ -238,6 +253,7 @@ WASM_API_EXTERN bool wasmtime_externref_new(wasmtime_context_t *context,
238253 */
239254WASM_API_EXTERN void * wasmtime_externref_data (wasmtime_context_t * context ,
240255 const wasmtime_externref_t * data );
256+ #endif // WASMTIME_FEATURE_GC
241257
242258/**
243259 * \brief Creates a new reference pointing to the same data that `ref` points
@@ -264,6 +280,7 @@ WASM_API_EXTERN void wasmtime_externref_clone(const wasmtime_externref_t *ref,
264280 */
265281WASM_API_EXTERN void wasmtime_externref_unroot (wasmtime_externref_t * ref );
266282
283+ #ifdef WASMTIME_FEATURE_GC
267284/**
268285 * \brief Converts a raw `externref` value coming from #wasmtime_val_raw_t into
269286 * a #wasmtime_externref_t.
@@ -274,7 +291,9 @@ WASM_API_EXTERN void wasmtime_externref_unroot(wasmtime_externref_t *ref);
274291WASM_API_EXTERN void wasmtime_externref_from_raw (wasmtime_context_t * context ,
275292 uint32_t raw ,
276293 wasmtime_externref_t * out );
294+ #endif // WASMTIME_FEATURE_GC
277295
296+ #ifdef WASMTIME_FEATURE_GC
278297/**
279298 * \brief Converts a #wasmtime_externref_t to a raw value suitable for storing
280299 * into a #wasmtime_val_raw_t.
@@ -287,6 +306,7 @@ WASM_API_EXTERN void wasmtime_externref_from_raw(wasmtime_context_t *context,
287306 */
288307WASM_API_EXTERN uint32_t wasmtime_externref_to_raw (
289308 wasmtime_context_t * context , const wasmtime_externref_t * ref );
309+ #endif // WASMTIME_FEATURE_GC
290310
291311/// \brief Discriminant stored in #wasmtime_val::kind
292312typedef uint8_t wasmtime_valkind_t ;
0 commit comments