nref: put refcount at the end of the test struct

This commit is contained in:
anna 2021-07-19 15:20:09 +02:00
parent e982ceb517
commit d561ff3fa9
Signed by: fef
GPG key ID: EC22E476DC2D3D84
2 changed files with 3 additions and 1 deletions

View file

@ -19,6 +19,7 @@ add_executable(neo_test neo_test.cpp)
include(string/string.cmake)
target_sources(neo_test PRIVATE
list.cpp
nref.cpp
)

View file

@ -15,8 +15,9 @@
* code rather than the fun quirks C++ is infamous for.
*/
extern "C" struct nref_test {
NREF_FIELD;
bool *called;
/* NREF_FIELD is not at the beginning to ensure offsets are subtracted */
NREF_FIELD;
};
void test_destroy(struct nref_test *ptr)