Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/bmesh/intern/bmesh_operator_api.h6
-rw-r--r--source/blender/bmesh/intern/bmesh_operators.c2
-rw-r--r--source/blender/python/bmesh/bmesh_py_ops_call.c4
3 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h
index e609500ddc3..c4e3ea7a436 100644
--- a/source/blender/bmesh/intern/bmesh_operator_api.h
+++ b/source/blender/bmesh/intern/bmesh_operator_api.h
@@ -228,7 +228,11 @@ typedef struct BMOpSlot {
float vec[3];
void **buf;
GHash *ghash;
- BMO_FlagSet *enum_flags;
+ struct {
+ /** Don't clobber (i) when assigning flags, see #eBMOpSlotSubType_Int. */
+ int _i;
+ BMO_FlagSet *flags;
+ } enum_data;
} data;
} BMOpSlot;
diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c
index 60de182499b..e4e8039c89f 100644
--- a/source/blender/bmesh/intern/bmesh_operators.c
+++ b/source/blender/bmesh/intern/bmesh_operators.c
@@ -142,7 +142,7 @@ static void bmo_op_slots_init(const BMOSlotType *slot_types, BMOpSlot *slot_args
break;
case BMO_OP_SLOT_INT:
if (ELEM(slot->slot_subtype.intg, BMO_OP_SLOT_SUBTYPE_INT_ENUM, BMO_OP_SLOT_SUBTYPE_INT_FLAG)) {
- slot->data.enum_flags = slot_types[i].enum_flags;
+ slot->data.enum_data.flags = slot_types[i].enum_flags;
}
default:
break;
diff --git a/source/blender/python/bmesh/bmesh_py_ops_call.c b/source/blender/python/bmesh/bmesh_py_ops_call.c
index ac328e852ac..dd90a491192 100644
--- a/source/blender/python/bmesh/bmesh_py_ops_call.c
+++ b/source/blender/python/bmesh/bmesh_py_ops_call.c
@@ -173,7 +173,7 @@ static int bpy_slot_from_py(
{
if (slot->slot_subtype.intg == BMO_OP_SLOT_SUBTYPE_INT_ENUM) {
int enum_val = -1;
- PyC_FlagSet *items = (PyC_FlagSet *)slot->data.enum_flags;
+ PyC_FlagSet *items = (PyC_FlagSet *)slot->data.enum_data.flags;
const char *enum_str = _PyUnicode_AsString(value);
if (enum_str == NULL) {
@@ -191,7 +191,7 @@ static int bpy_slot_from_py(
}
else if (slot->slot_subtype.intg == BMO_OP_SLOT_SUBTYPE_INT_FLAG) {
int flag = 0;
- PyC_FlagSet *items = (PyC_FlagSet *)slot->data.enum_flags;
+ PyC_FlagSet *items = (PyC_FlagSet *)slot->data.enum_data.flags;
if (PyC_FlagSet_ToBitfield(items, value, &flag, slot_name) == -1) {
return -1;