Skip to content

Commit fb1442b

Browse files
author
icex2
committed
feat: Add helper to set avs implementations
Doesn't really reduce boiler plate but adds clarity with a more meaningful function name what the operation does.
1 parent 87b7e53 commit fb1442b

3 files changed

Lines changed: 24 additions & 0 deletions

File tree

src/main/avs-util/Module.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ libs += avs-util
33
libs_avs-util := \
44

55
src_avs-util := \
6+
core-interop.c \
67
error.c \

src/main/avs-util/core-interop.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include "core/log.h"
2+
#include "core/thread.h"
3+
4+
#include "imports/avs.h"
5+
6+
void avs_util_core_interop_log_avs_impl_set()
7+
{
8+
core_log_impl_set(
9+
log_body_misc, log_body_info, log_body_warning, log_body_fatal);
10+
}
11+
12+
void avs_util_core_interop_thread_avs_impl_set()
13+
{
14+
core_thread_impl_set(
15+
avs_thread_create, avs_thread_join, avs_thread_destroy);
16+
}

src/main/avs-util/core-interop.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#ifndef AVS_UTIL_CORE_INTEROP_H
2+
#define AVS_UTIL_CORE_INTEROP_H
3+
4+
void avs_util_core_interop_log_avs_impl_set();
5+
void avs_util_core_interop_thread_avs_impl_set();
6+
7+
#endif

0 commit comments

Comments
 (0)