From e3fd00bb4e2b7b4cabfb416e59fdf83e331a9374 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Sun, 8 Jun 2025 00:32:13 -0600 Subject: libmisc: obj.h: Fix boxing from one interface to another --- libmisc/tests/test_obj_nest.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libmisc/tests/test_obj_nest.c') diff --git a/libmisc/tests/test_obj_nest.c b/libmisc/tests/test_obj_nest.c index d5e563e..66c1efd 100644 --- a/libmisc/tests/test_obj_nest.c +++ b/libmisc/tests/test_obj_nest.c @@ -69,5 +69,14 @@ int main() { char buf[6] = {}; test_assert(LO_CALL(obj, read, buf, 3) == 3); test_assert(memcmp(buf, "Hel\0\0\0", 6) == 0); + + lo_interface reader rd = lo_box_myclass_as_reader(&_obj); + rd = lo_box_read_writer_as_reader(obj); + (void) rd; + + lo_interface writer wr = lo_box_myclass_as_writer(&_obj); + wr = lo_box_read_writer_as_writer(obj); + (void) wr; + return 0; } -- cgit v1.2.3-2-g168b