diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-07-19 19:30:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-07-19 19:33:40 +0400 |
commit | 00b29156e087bba3675c7247ffe64a1696a90558 (patch) | |
tree | 334d5be951b6d69873908dfdfe6b29439788aaab /source/blender/python/intern | |
parent | 7e8626bbcec21c682dc9159fe0307d157c56ede4 (diff) |
Defines: replace ELEM3-16 with ELEM(...), that can take varargs
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 440af035bcd..3fdc3641173 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -1363,7 +1363,7 @@ PyObject *pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop) if (subtype == PROP_BYTESTRING) { ret = PyBytes_FromStringAndSize(buf, buf_len); } - else if (ELEM3(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME)) { + else if (ELEM(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME)) { ret = PyC_UnicodeFromByteAndSize(buf, buf_len); } else { @@ -1629,7 +1629,7 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb /* Unicode String */ #ifdef USE_STRING_COERCE PyObject *value_coerce = NULL; - if (ELEM3(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME)) { + if (ELEM(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME)) { /* TODO, get size */ param = PyC_UnicodeAsByte(value, &value_coerce); } @@ -4894,7 +4894,7 @@ static PyObject *pyrna_param_to_py(PointerRNA *ptr, PropertyRNA *prop, void *dat if (subtype == PROP_BYTESTRING) { ret = PyBytes_FromString(data_ch); } - else if (ELEM3(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME)) { + else if (ELEM(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME)) { ret = PyC_UnicodeFromByte(data_ch); } else { |