@@ -56,6 +56,7 @@ typedef struct wasmtime_anyref {
5656 void * __private3 ;
5757} wasmtime_anyref_t ;
5858
59+ #ifdef WASMTIME_FEATURE_GC
5960/// \brief Helper function to initialize the `ref` provided to a null anyref
6061/// value.
6162static inline void wasmtime_anyref_set_null (wasmtime_anyref_t * ref ) {
@@ -71,6 +72,7 @@ static inline bool wasmtime_anyref_is_null(const wasmtime_anyref_t *ref) {
7172 return ref -> store_id == 0 ;
7273}
7374
75+
7476/**
7577 * \brief Creates a new reference pointing to the same data that `anyref`
7678 * points to (depending on the configured collector this might increase a
@@ -201,6 +203,8 @@ WASM_API_EXTERN bool wasmtime_anyref_i31_get_s(wasmtime_context_t *context,
201203 * `wasmtime_externref_set_null`. Null can be tested for with the
202204 * `wasmtime_externref_is_null` function.
203205 */
206+ #endif // WASMTIME_FEATURE_GC
207+
204208typedef struct wasmtime_externref {
205209 /// Internal metadata tracking within the store, embedders should not
206210 /// configure or modify these fields.
@@ -213,6 +217,7 @@ typedef struct wasmtime_externref {
213217 void * __private3 ;
214218} wasmtime_externref_t ;
215219
220+ #ifdef WASMTIME_FEATURE_GC
216221/// \brief Helper function to initialize the `ref` provided to a null externref
217222/// value.
218223static inline void wasmtime_externref_set_null (wasmtime_externref_t * ref ) {
@@ -313,6 +318,7 @@ WASM_API_EXTERN void wasmtime_externref_from_raw(wasmtime_context_t *context,
313318 */
314319WASM_API_EXTERN uint32_t wasmtime_externref_to_raw (
315320 wasmtime_context_t * context , const wasmtime_externref_t * ref );
321+ #endif // WASMTIME_FEATURE_GC
316322
317323/**
318324 * \typedef wasmtime_exnref_t
@@ -397,6 +403,7 @@ typedef uint8_t wasmtime_valkind_t;
397403/// stored in little-endian order.
398404typedef uint8_t wasmtime_v128 [16 ];
399405
406+
400407/**
401408 * \typedef wasmtime_valunion_t
402409 * \brief Convenience alias for #wasmtime_valunion
0 commit comments