-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
There are two fields in Element
that are potentially redundant. We have pointer
, an optional uintptr_t
, and data which is a variant potentially containing a struct Pointer { uintptr_t p; };
.
object-introspection/include/oi/result/Element.h
Lines 50 to 52 in 4c6f232
std::optional<uintptr_t> pointer; | |
std::variant<std::nullopt_t, Pointer, Scalar, std::string> data = { | |
std::nullopt}; |
The question of which field is better depends on if we want to be able to store field data as well as pointer data. I suspect that we might for memory layout data along with value capture. In that case, we should probably remove the pointer field from the data variant and set pointer itself instead. If we never need both data and a pointer, we could drop the pointer field and always use the variant.
Metadata
Metadata
Assignees
Labels
No labels