From b9679eb5c18d4ff8a4da367fa122fb9e0d2b6ba4 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Wed, 4 Dec 2019 14:38:54 +0100 Subject: [PATCH] doc(runtime-c-api) Improve documentation of `wasmer_wasi_generate_import_object_for_version`. --- lib/runtime-c-api/src/import/wasi.rs | 4 +++- lib/runtime-c-api/wasmer.h | 4 +++- lib/runtime-c-api/wasmer.hh | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/runtime-c-api/src/import/wasi.rs b/lib/runtime-c-api/src/import/wasi.rs index 9b63a96a1f6..46caab24880 100644 --- a/lib/runtime-c-api/src/import/wasi.rs +++ b/lib/runtime-c-api/src/import/wasi.rs @@ -75,10 +75,12 @@ pub unsafe extern "C" fn wasmer_wasi_generate_import_object( .unwrap_or(ptr::null_mut()) } -/// Creates a WASI import object. +/// Creates a WASI import object for a specific version. /// /// This function is similar to `wasmer_wasi_generate_import_object` /// except that the first argument describes the WASI version. +/// +/// The version is expected to be of kind `Version`. #[no_mangle] pub unsafe extern "C" fn wasmer_wasi_generate_import_object_for_version( version: c_uchar, diff --git a/lib/runtime-c-api/wasmer.h b/lib/runtime-c-api/wasmer.h index 09d716e8ab5..282a6ee05d4 100644 --- a/lib/runtime-c-api/wasmer.h +++ b/lib/runtime-c-api/wasmer.h @@ -907,10 +907,12 @@ wasmer_import_object_t *wasmer_wasi_generate_import_object(const wasmer_byte_arr unsigned int mapped_dirs_len); /** - * Creates a WASI import object. + * Creates a WASI import object for a specific version. * * This function is similar to `wasmer_wasi_generate_import_object` * except that the first argument describes the WASI version. + * + * The version is expected to be of kind `Version`. */ wasmer_import_object_t *wasmer_wasi_generate_import_object_for_version(unsigned char version, const wasmer_byte_array *args, diff --git a/lib/runtime-c-api/wasmer.hh b/lib/runtime-c-api/wasmer.hh index aac8daec312..a78780118d0 100644 --- a/lib/runtime-c-api/wasmer.hh +++ b/lib/runtime-c-api/wasmer.hh @@ -711,10 +711,12 @@ wasmer_import_object_t *wasmer_wasi_generate_import_object(const wasmer_byte_arr const wasmer_wasi_map_dir_entry_t *mapped_dirs, unsigned int mapped_dirs_len); -/// Creates a WASI import object. +/// Creates a WASI import object for a specific version. /// /// This function is similar to `wasmer_wasi_generate_import_object` /// except that the first argument describes the WASI version. +/// +/// The version is expected to be of kind `Version`. wasmer_import_object_t *wasmer_wasi_generate_import_object_for_version(unsigned char version, const wasmer_byte_array *args, unsigned int args_len,