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:
authorCampbell Barton <ideasman42@gmail.com>2021-07-15 11:23:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-07-15 11:29:01 +0300
commit8e8a6b80cf2749d176d14eaa3bbfd0eccc9ec75e (patch)
tree7448ea0f5b8ab12f90d6d3201eab05f3618f674d /source/blender/python
parenta63a0ee24bf05346399a16f42d92747e1cf6a815 (diff)
Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")
This shows the text as part of the assertion message.
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/intern/bpy_app_handlers.c2
-rw-r--r--source/blender/python/intern/bpy_rna.c8
-rw-r--r--source/blender/python/mathutils/mathutils_Color.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c
index 7c5c1122aea..8dc5a6c629c 100644
--- a/source/blender/python/intern/bpy_app_handlers.c
+++ b/source/blender/python/intern/bpy_app_handlers.c
@@ -225,7 +225,7 @@ PyObject *BPY_app_handlers_struct(void)
#endif
if (PyType_Ready(&BPyPersistent_Type) < 0) {
- BLI_assert(!"error initializing 'bpy.app.handlers.persistent'");
+ BLI_assert_msg(0, "error initializing 'bpy.app.handlers.persistent'");
}
PyStructSequence_InitType(&BlenderAppCbType, &app_cb_info_desc);
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index a8ab54ac3bb..e6f3e509469 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -2728,7 +2728,7 @@ static PyObject *pyrna_prop_array_subscript_slice(BPy_PropertyArrayRNA *self,
break;
}
default:
- BLI_assert(!"Invalid array type");
+ BLI_assert_msg(0, "Invalid array type");
PyErr_SetString(PyExc_TypeError, "not an array type");
Py_DECREF(tuple);
@@ -4375,7 +4375,7 @@ static PyObject *pyrna_struct_getattro(BPy_StructRNA *self, PyObject *pyname)
}
default:
/* Should never happen. */
- BLI_assert(!"Invalid context type");
+ BLI_assert_msg(0, "Invalid context type");
PyErr_Format(PyExc_AttributeError,
"bpy_struct: Context type invalid %d, can't get \"%.200s\" from context",
@@ -5389,7 +5389,7 @@ static PyObject *foreach_getset(BPy_PropertyRNA *self, PyObject *args, int set)
break;
case PROP_RAW_UNSET:
/* Should never happen. */
- BLI_assert(!"Invalid array type - set");
+ BLI_assert_msg(0, "Invalid array type - set");
break;
}
@@ -5453,7 +5453,7 @@ static PyObject *foreach_getset(BPy_PropertyRNA *self, PyObject *args, int set)
break;
default: /* PROP_RAW_UNSET */
/* Should never happen. */
- BLI_assert(!"Invalid array type - get");
+ BLI_assert_msg(0, "Invalid array type - get");
item = Py_None;
Py_INCREF(item);
break;
diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c
index 819874e4355..7546f2ef730 100644
--- a/source/blender/python/mathutils/mathutils_Color.c
+++ b/source/blender/python/mathutils/mathutils_Color.c
@@ -570,7 +570,7 @@ static PyObject *Color_mul(PyObject *v1, PyObject *v2)
}
}
else {
- BLI_assert(!"internal error");
+ BLI_assert_msg(0, "internal error");
}
PyErr_Format(PyExc_TypeError,