doc: update ffi design

This commit is contained in:
2026-08-14 16:38:09 +08:00
parent d7e92d588f
commit 40fee18194
9 changed files with 144 additions and 28 deletions
@@ -78,7 +78,7 @@ An example is shown below:
* @param[out] out_c Example output parameter.
* @return Example return value.
*/
int FlFooBar(OMRF_IN(int) in_a, OMRF_IN(int) in_b, OMRF_OUT(int) out_c);
int FlFooBar(OMRF_IN_PARAM_TY(int) in_a, OMRF_IN_PARAM_TY(int) in_b, OMRF_OUT_PARAM_TY(int) out_c);
```
### Object Docstring
@@ -352,7 +352,7 @@ When the following situations occur, additional requirements apply to the corres
When a parameter carries a pointer, the `@param` annotation of that parameter must state whether the pointer could be NULL (for output) or whether passing NULL is allowed (for input).
Note that the pointer mentioned here refers to the case where the type decorated by `OMRF_IN` or `OMRF_OUT` is itself a pointer type. Since every output parameter is passed by pointer, the pointer mentioned above does not refer to that pointer created by the output decoration.
Note that the pointer mentioned here refers to the case where the type decorated by `OMRF_IN_PARAM_TY` or `OMRF_OUT_PARAM_TY` is itself a pointer type. Since every output parameter is passed by pointer, the pointer mentioned above does not refer to that pointer created by the output decoration.
### String Lifetime