Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
FelonEkonom committed Aug 17, 2021
1 parent 8e1ced9 commit efe59ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/creating_unifex_natives.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ UNIFEX_TERM foo(UnifexEnv* env, int num) {
return foo_result_ok(env, num);
}
```
For every tuple, that might be returned from our Unifex function (in this case, it is `foo`), there will be generated implementation of result function named `[orginal_function_name]_result_[label]`, where `label` is an atom with type `label` in returned tuple. The type of the first argument of this function will be `UnifexEnv*`, number and types of the rest of the arguments will depend on the number and types of rest of elements in the returned tuple (see the table below).
The provided `foo` implementation returns the passed argument, by using `foo_result_ok`. For every tuple, that might be returned from our Unifex function, there will be generated implementation of result function named `[orginal_function_name]_result_[label]`, where `label` is an atom with type `label` in returned tuple. The type of the first argument of this function will be `UnifexEnv*`, number and types of the rest of the arguments will depend on the number and types of rest of elements in the returned tuple
It is a very simple C code that always returns the same number it gets.
Expand Down

0 comments on commit efe59ab

Please sign in to comment.