@@ -75,8 +75,15 @@ void fizzy_free_module(const struct FizzyModule* module);
7575/// Takes ownership of module, i.e. @p module is invalidated after this call.
7676///
7777/// @param module Pointer to module.
78- /// @param imported_functions Pointer to the imported function array.
78+ /// @param imported_functions Pointer to the imported function array. Can be NULL iff
79+ /// imported_functions_size equals 0.
7980/// @param imported_functions_size Size of the imported function array. Can be zero.
81+ ///
82+ /// @note
83+ /// Function expects @a imported_functions to be in the order of imports defined in the module.
84+ /// No validation is done on the number of functions passed in, nor on their order.
85+ /// When number of passed functions or their order is different from the one defined by the
86+ /// module, behaviour is undefined.
8087struct FizzyInstance * fizzy_instantiate (const struct FizzyModule * module ,
8188 const struct FizzyExternalFunction * imported_functions , size_t imported_functions_size );
8289
@@ -88,6 +95,11 @@ void fizzy_free_instance(struct FizzyInstance* instance);
8895/// @param instance Pointer to module instance.
8996/// @param args Pointer to the argument array. Can be NULL if function has 0 inputs.
9097/// @param depth Call stack depth.
98+ ///
99+ /// @note
100+ /// No validation is done on the number of arguments passed in @p args, nor on their types.
101+ /// When number of passed arguments or their types are different from the ones defined by the
102+ /// function type, behaviour is undefined.
91103FizzyExecutionResult fizzy_execute (
92104 struct FizzyInstance * instance , uint32_t func_idx , const union FizzyValue * args , int depth );
93105
0 commit comments