Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXX

Also use doxy style function reference `#` prefix chars when
referencing identifiers.
This commit is contained in:
2021-07-03 23:08:40 +10:00
parent 05f970847e
commit 9b89de2571
638 changed files with 1434 additions and 1419 deletions

View File

@@ -1784,7 +1784,7 @@ static const EnumPropertyItem *enum_items_from_py(PyObject *seq_fast,
(tmp.identifier = PyUnicode_AsUTF8AndSize(PyTuple_GET_ITEM(item, 0), &id_str_size)) &&
(tmp.name = PyUnicode_AsUTF8AndSize(PyTuple_GET_ITEM(item, 1), &name_str_size)) &&
(tmp.description = PyUnicode_AsUTF8AndSize(PyTuple_GET_ITEM(item, 2), &desc_str_size)) &&
/* TODO, number isn't ensured to be unique from the script author */
/* TODO: number isn't ensured to be unique from the script author. */
(item_size != 4 || py_long_as_int(PyTuple_GET_ITEM(item, 3), &tmp.value)) &&
(item_size != 5 || ((py_long_as_int(PyTuple_GET_ITEM(item, 3), &tmp.icon) ||
(tmp_icon = PyUnicode_AsUTF8(PyTuple_GET_ITEM(item, 3)))) &&
@@ -3509,7 +3509,7 @@ static PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw)
if (def) {
/* Only support getting integer default values here. */
if (!py_long_as_int(def, &defvalue)) {
/* note, using type error here is odd but python does this for invalid arguments */
/* NOTE: using type error here is odd but python does this for invalid arguments. */
PyErr_SetString(
PyExc_TypeError,
"EnumProperty(...): 'default' can only be an integer when 'items' is a function");
@@ -3557,7 +3557,7 @@ static PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw)
RNA_def_property_duplicate_pointers(srna, prop);
if (is_itemf == false) {
/* note: this must be postponed until after #RNA_def_property_duplicate_pointers
/* NOTE: this must be postponed until after #RNA_def_property_duplicate_pointers
* otherwise if this is a generator it may free the strings before we copy them */
Py_DECREF(items_fast);