Skip to content
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.

Commit

Permalink
doc: add safety comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Wodann committed Nov 10, 2019
1 parent 830bf08 commit cacb42b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion include/mun/runtime_capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,12 @@ const char *mun_error_message(MunErrorHandle error_handle);
*
* The runtime must be manually destructed using [`mun_runtime_destroy`].
*
* TOOD: expose interval at which the runtime's file watcher operates.
* TODO: expose interval at which the runtime's file watcher operates.
*
* # Safety
*
* This function receives raw pointers as parameters. If any of the arguments is a null pointer,
* an error will be returned. Passing pointers to invalid data, will lead to undefined behavior.
*/
MunErrorHandle mun_runtime_create(const char *library_path, MunRuntimeHandle *handle);

Expand All @@ -160,6 +165,11 @@ void mun_runtime_destroy(MunRuntimeHandle handle);
*
* If a non-zero error handle is returned, it must be manually destructed using
* [`mun_error_destroy`].
*
* # Safety
*
* This function receives raw pointers as parameters. If any of the arguments is a null pointer,
* an error will be returned. Passing pointers to invalid data, will lead to undefined behavior.
*/
MunErrorHandle mun_runtime_get_function_info(MunRuntimeHandle handle,
const char *fn_name,
Expand All @@ -172,6 +182,11 @@ MunErrorHandle mun_runtime_get_function_info(MunRuntimeHandle handle,
*
* If a non-zero error handle is returned, it must be manually destructed using
* [`mun_error_destroy`].
*
* # Safety
*
* This function receives raw pointers as parameters. If any of the arguments is a null pointer,
* an error will be returned. Passing pointers to invalid data, will lead to undefined behavior.
*/
MunErrorHandle mun_runtime_update(MunRuntimeHandle handle, bool *updated);

Expand Down

0 comments on commit cacb42b

Please sign in to comment.