1515extern "C" {
1616#endif
1717
18+
1819/**
1920 * \typedef wasmtime_anyref_t
2021 * \brief Convenience alias for #wasmtime_anyref
@@ -52,6 +53,7 @@ typedef struct wasmtime_anyref {
5253 void * __private3 ;
5354} wasmtime_anyref_t ;
5455
56+ #ifdef WASMTIME_FEATURE_GC
5557/// \brief Helper function to initialize the `ref` provided to a null anyref
5658/// value.
5759static inline void wasmtime_anyref_set_null (wasmtime_anyref_t * ref ) {
@@ -67,6 +69,7 @@ static inline bool wasmtime_anyref_is_null(const wasmtime_anyref_t *ref) {
6769 return ref -> store_id == 0 ;
6870}
6971
72+
7073/**
7174 * \brief Creates a new reference pointing to the same data that `anyref`
7275 * points to (depending on the configured collector this might increase a
@@ -175,6 +178,8 @@ WASM_API_EXTERN bool wasmtime_anyref_i31_get_s(wasmtime_context_t *context,
175178 * `wasmtime_externref_set_null`. Null can be tested for with the
176179 * `wasmtime_externref_is_null` function.
177180 */
181+ #endif // WASMTIME_FEATURE_GC
182+
178183typedef struct wasmtime_externref {
179184 /// Internal metadata tracking within the store, embedders should not
180185 /// configure or modify these fields.
@@ -187,6 +192,7 @@ typedef struct wasmtime_externref {
187192 void * __private3 ;
188193} wasmtime_externref_t ;
189194
195+ #ifdef WASMTIME_FEATURE_GC
190196/// \brief Helper function to initialize the `ref` provided to a null externref
191197/// value.
192198static inline void wasmtime_externref_set_null (wasmtime_externref_t * ref ) {
@@ -287,6 +293,7 @@ WASM_API_EXTERN void wasmtime_externref_from_raw(wasmtime_context_t *context,
287293 */
288294WASM_API_EXTERN uint32_t wasmtime_externref_to_raw (
289295 wasmtime_context_t * context , const wasmtime_externref_t * ref );
296+ #endif // WASMTIME_FEATURE_GC
290297
291298/// \brief Discriminant stored in #wasmtime_val::kind
292299typedef uint8_t wasmtime_valkind_t ;
@@ -314,6 +321,7 @@ typedef uint8_t wasmtime_valkind_t;
314321/// stored in little-endian order.
315322typedef uint8_t wasmtime_v128 [16 ];
316323
324+
317325/**
318326 * \typedef wasmtime_valunion_t
319327 * \brief Convenience alias for #wasmtime_valunion
0 commit comments