diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-18 07:07:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-18 08:04:07 +0300 |
commit | ab7ebf2b10f67b002447fb0e2cb352c2c178e128 (patch) | |
tree | 8ca38116cf22d8a5e8c6b788f93a84ba1963cb4c /source/blender/python/intern/bpy_rna.h | |
parent | 92611dada67fcc151c894462749031be1de27191 (diff) |
Cleanup: Use const for RNA EnumPropertyItem args
Practically all access to enum data is read-only.
Diffstat (limited to 'source/blender/python/intern/bpy_rna.h')
-rw-r--r-- | source/blender/python/intern/bpy_rna.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h index 605f79b1ad8..f666294666e 100644 --- a/source/blender/python/intern/bpy_rna.h +++ b/source/blender/python/intern/bpy_rna.h @@ -186,14 +186,17 @@ int pyrna_pydict_to_props(PointerRNA *ptr, PyObject *kw, const bool all_args, co PyObject *pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop); unsigned int *pyrna_set_to_enum_bitmap( - struct EnumPropertyItem *items, PyObject *value, + const struct EnumPropertyItem *items, PyObject *value, int type_size, bool type_convert_sign, int bitmap_size, const char *error_prefix); -PyObject *pyrna_enum_bitfield_to_py(struct EnumPropertyItem *items, int value); -int pyrna_set_to_enum_bitfield(EnumPropertyItem *items, PyObject *value, int *r_value, const char *error_prefix); +PyObject *pyrna_enum_bitfield_to_py( + const struct EnumPropertyItem *items, int value); +int pyrna_set_to_enum_bitfield( + const struct EnumPropertyItem *items, PyObject *value, int *r_value, const char *error_prefix); -int pyrna_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int *value, const char *error_prefix); +int pyrna_enum_value_from_id( + const EnumPropertyItem *item, const char *identifier, int *value, const char *error_prefix); int pyrna_deferred_register_class(struct StructRNA *srna, PyTypeObject *py_class); |