Closed DenisBiryukov91 closed 3 months ago
I.e instead of #define _Z_OWNED_TYPE_PTR(type, name) typedef struct { type *_val; } z_owned_##name##_t;
#define _Z_OWNED_TYPE_PTR(type, name) typedef struct { type *_val; } z_owned_##name##_t;
consider using
#define _Z_OWNED_TYPE_PTR(type, name) typedef struct { type _val; } z_owned_##name##_t;
This would allow unifying layout of owned/loaned objects (which is very desirable for cpp) and also greatly reduce amount of malloc calls.
Describe the release item
I.e instead of
#define _Z_OWNED_TYPE_PTR(type, name) typedef struct { type *_val; } z_owned_##name##_t;
consider using
#define _Z_OWNED_TYPE_PTR(type, name) typedef struct { type _val; } z_owned_##name##_t;
This would allow unifying layout of owned/loaned objects (which is very desirable for cpp) and also greatly reduce amount of malloc calls.