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>2013-03-10 10:18:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-10 10:18:03 +0400
commitf9f707033665dc737f1011e82406a12fafa78326 (patch)
treef1c69f7f99ec010b529be0f0724b39e80d1303ce /source/blender/python/intern/bpy_props.c
parentf99be71850f6f40715f6b8f6fe9058fb66470dfa (diff)
add STREQ macro (commonly used macro like CLAMP, MAX2, STRINGIFY). Use for some areas of the python api, bmesh.
Diffstat (limited to 'source/blender/python/intern/bpy_props.c')
-rw-r--r--source/blender/python/intern/bpy_props.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c
index 830c2c8de3a..c330eb1549d 100644
--- a/source/blender/python/intern/bpy_props.c
+++ b/source/blender/python/intern/bpy_props.c
@@ -1265,9 +1265,11 @@ static int icon_id_from_name(const char *name)
int id;
if (name[0]) {
- for (item = icon_items, id = 0; item->identifier; item++, id++)
- if (strcmp(item->name, name) == 0)
+ for (item = icon_items, id = 0; item->identifier; item++, id++) {
+ if (STREQ(item->name, name)) {
return item->value;
+ }
+ }
}
return 0;
@@ -1353,7 +1355,7 @@ static EnumPropertyItem *enum_items_from_py(PyObject *seq_fast, PyObject *def, i
tmp.value = i;
}
- if (def && def_used == 0 && strcmp(def_cmp, tmp.identifier) == 0) {
+ if (def && def_used == 0 && STREQ(def_cmp, tmp.identifier)) {
*defvalue = tmp.value;
def_used++; /* only ever 1 */
}