Thanks for looking at this! > > Therefore, rename ObjectPropertyFlags to ObjectPropertyAccessorFlags, > > and then the original name ObjectPropertyFlags can be used for other > > cases. > > I wonder if we can just make existing ObjectPropertyFlags per object as you > are planing > and still continue using it for accessor flags. > > That basically will lets you use new flags everywhere without rewriting call > sites > everywhere.
I'm not sure about this. Currently, these read/write flags are actually specific to pointer properties (as showed by the changes in this patch, which all involve object_property_add_*_ptr() / object_class_property_add_*_ptr()). Other property types doesn't yet support flag parameters, so additional interface modifications are still needed. And for now other property types either need to explicitly specify get/set accessors (e.g., object_property_add_bool()) or directly use the default get/set methods (e.g., object_property_add_link()). If we extend read/write flags to other property types, such as adding "flags" argument to object_property_add_bool(), we must ensure the OBJ_PROP_FLAG_READ flag align with "get" argument and OBJ_PROP_FLAG_WRITE flag align with "set" parameters. This would introduces additional complexity. Thanks, Zhao
