From ab7ebf2b10f67b002447fb0e2cb352c2c178e128 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 18 Oct 2017 15:07:26 +1100 Subject: Cleanup: Use const for RNA EnumPropertyItem args Practically all access to enum data is read-only. --- source/blender/python/intern/bpy_rna.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source/blender/python/intern/bpy_rna.h') 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); -- cgit v1.2.3