On 10/02/2026 04.23, Zhao Liu wrote:
Introduce a 'flags' field in the ObjectProperty structure to store property-specific behavior modifiers.Currently, ObjectPropertyFlags (READ/WRITE) are only used for property creation (e.g., initialize accessors for pointer properties). By caching these flags directly in ObjectProperty, we can: 1. Preserve the initial access intent (read/write) of the property. * the READ/WRITE flags cached in ObjectProperty have no effect for now, but they may be useful for cases need write-once, if needed. 2. Reuse existing ObjectPropertyFlags and provide a foundation for future flags (e.g., to track if a property was explicitly set by external user). To avoid "incomplete type" error, move ObjectPropertyFlags before ObjectProperty definition, and polish the comment of ObjectPropertyFlags to clarify how READ/WRITE flags work for general properties. Suggested-by: Igor Mammedov <[email protected]> Signed-off-by: Zhao Liu <[email protected]> --- include/qom/object.h | 34 +++++++++++++++++++++++++--------- qom/object.c | 16 +++++++++++++++- 2 files changed, 40 insertions(+), 10 deletions(-)
Reviewed-by: Thomas Huth <[email protected]>
