Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider replacing ptr field in non-ref counted owned objects with value. #475

Closed
DenisBiryukov91 opened this issue Jun 27, 2024 · 0 comments
Labels
release Part of the next release

Comments

@DenisBiryukov91
Copy link
Contributor

DenisBiryukov91 commented Jun 27, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Part of the next release
Projects
Status: Done
Development

No branches or pull requests

1 participant