shared: add nm_offsetofend() macro

This commit is contained in:
Thomas Haller
2017-01-16 16:10:28 +01:00
parent 9cf3cbfc3e
commit 61da320d62

View File

@@ -36,6 +36,8 @@
#define _nm_const __attribute__ ((const))
#define _nm_printf(a,b) __attribute__ ((__format__ (__printf__, a, b)))
#define nm_offsetofend(t,m) (G_STRUCT_OFFSET (t,m) + sizeof (((t *) NULL)->m))
#define nm_auto(fcn) __attribute__ ((cleanup(fcn)))
/**