summaryrefslogtreecommitdiff
path: root/libmisc/tests/test_obj_nest.c
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-06-10 00:47:32 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-06-10 16:47:14 -0600
commit6eafa9fd3a49289d34007a018b6d1fba8e4b7e24 (patch)
tree61dddfb0735fe841a0e1c56ea331a360a2d2dad0 /libmisc/tests/test_obj_nest.c
parentdb43b1ae4456367d9909ce3ccc00be7dede651fc (diff)
libmisc: obj.h: Rework the LO_INTERFACE_* API to expose method funcs
Diffstat (limited to 'libmisc/tests/test_obj_nest.c')
-rw-r--r--libmisc/tests/test_obj_nest.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/libmisc/tests/test_obj_nest.c b/libmisc/tests/test_obj_nest.c
index 20ffe4a..b52cd7b 100644
--- a/libmisc/tests/test_obj_nest.c
+++ b/libmisc/tests/test_obj_nest.c
@@ -25,21 +25,15 @@ LO_INTERFACE(writer);
LO_NEST(writer)
LO_INTERFACE(read_writer);
-/* implementation header ******************************************************/
+/* implementation *************************************************************/
struct myclass {
size_t len;
char buf[512];
};
-LO_IMPLEMENTATION_H(reader, struct myclass, myclass);
-LO_IMPLEMENTATION_H(writer, struct myclass, myclass);
-LO_IMPLEMENTATION_H(read_writer, struct myclass, myclass);
-
-/* implementation main ********************************************************/
-
-LO_IMPLEMENTATION_C(reader, struct myclass, myclass, static);
-LO_IMPLEMENTATION_C(writer, struct myclass, myclass, static);
-LO_IMPLEMENTATION_C(read_writer, struct myclass, myclass, static);
+LO_IMPLEMENTATION_STATIC(reader, struct myclass, myclass);
+LO_IMPLEMENTATION_STATIC(writer, struct myclass, myclass);
+LO_IMPLEMENTATION_STATIC(read_writer, struct myclass, myclass);
static size_t myclass_read(struct myclass *self, void *buf, size_t count) {
test_assert(self);