libubus: Make UBUS_* macros work cleanly in C++ master
authorKarsten Sperling <ksperling@apple.com>
Tue, 11 Jun 2024 03:58:15 +0000 (15:58 +1200)
committerKarsten Sperling <ksperling@apple.com>
Tue, 11 Jun 2024 03:58:15 +0000 (15:58 +1200)
commit252a9b0c1774790fb9c25735d5a09c27dba895db
treeba64818592cf050ff87268d1c79d1cf77deb5f42
parent65bb027054def3b94a977229fd6ad62ddd32345b
libubus: Make UBUS_* macros work cleanly in C++

C++ is picky about initializer order, and (depending on flags) missing fields.
This fix makes UBUS_METHOD_* and UBUS_OBJECT_TYPE initialize all fields of the
respective structs in the correct order.

Also replace BIT(x) with an explicit expression since BIT() may not be defined.

Signed-off-by: Karsten Sperling <ksperling@apple.com>
CMakeLists.txt
libubus.h
tests/CMakeLists.txt
tests/test-cplusplus.cpp [new file with mode: 0644]