diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-10 10:18:03 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-10 10:18:03 +0400 |
commit | f9f707033665dc737f1011e82406a12fafa78326 (patch) | |
tree | f1c69f7f99ec010b529be0f0724b39e80d1303ce /source/blender/python/generic | |
parent | f99be71850f6f40715f6b8f6fe9058fb66470dfa (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/generic')
-rw-r--r-- | source/blender/python/generic/py_capi_utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index 56d9e2ac0dd..2876d7666f4 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -751,7 +751,7 @@ void *PyC_RNA_AsPointer(PyObject *value, const char *type_name) PyObject *as_pointer; PyObject *pointer; - if (!strcmp(Py_TYPE(value)->tp_name, type_name) && + if (STREQ(Py_TYPE(value)->tp_name, type_name) && (as_pointer = PyObject_GetAttrString(value, "as_pointer")) != NULL && PyCallable_Check(as_pointer)) { @@ -804,7 +804,7 @@ char *PyC_FlagSet_AsString(PyC_FlagSet *item) int PyC_FlagSet_ValueFromID_int(PyC_FlagSet *item, const char *identifier, int *value) { for ( ; item->identifier; item++) { - if (strcmp(item->identifier, identifier) == 0) { + if (STREQ(item->identifier, identifier)) { *value = item->value; return 1; } |