Cleanup: spelling in comments

This commit is contained in:
2022-09-16 18:13:19 +10:00
parent 48d7ff68f0
commit 95f05a6a4b
126 changed files with 214 additions and 209 deletions

View File

@@ -559,7 +559,7 @@ PyObject *BPY_app_struct(void)
BlenderAppType.tp_hash = (hashfunc)
_Py_HashPointer; /* without this we can't do set(sys.modules) T29635. */
/* kindof a hack ontop of PyStructSequence */
/* Kind of a hack on top of #PyStructSequence. */
py_struct_seq_getset_init();
py_struct_seq_method_init();

View File

@@ -108,7 +108,7 @@ static PyTypeObject bpy_lib_Type = {
NULL, /* ternaryfunc tp_call; */
NULL, /* reprfunc tp_str; */
/* will only use these if this is a subtype of a py class */
/* Will only use these if this is a sub-type of a Python class. */
PyObject_GenericGetAttr, /* getattrofunc tp_getattro; */
NULL, /* setattrofunc tp_setattro; */

View File

@@ -1397,7 +1397,7 @@ PyObject *pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop)
buf = RNA_property_string_get_alloc(ptr, prop, buf_fixed, sizeof(buf_fixed), &buf_len);
#ifdef USE_STRING_COERCE
/* Only file paths get special treatment, they may contain non utf-8 chars. */
/* Only file paths get special treatment, they may contain non UTF-8 chars. */
if (subtype == PROP_BYTESTRING) {
ret = PyBytes_FromStringAndSize(buf, buf_len);
}
@@ -6487,7 +6487,7 @@ static PyObject *pyrna_func_doc_get(BPy_FunctionRNA *self, void *UNUSED(closure)
PyTypeObject pyrna_struct_meta_idprop_Type = {
PyVarObject_HEAD_INIT(NULL, 0) "bpy_struct_meta_idprop", /* tp_name */
/* NOTE: would be PyTypeObject, but subtypes of Type must be PyHeapTypeObject's. */
/* NOTE: would be PyTypeObject, but sub-types of Type must be PyHeapTypeObject's. */
sizeof(PyHeapTypeObject), /* tp_basicsize */
0, /* tp_itemsize */
@@ -7308,7 +7308,7 @@ static PyObject *pyrna_srna_PyBase(StructRNA *srna) //, PyObject *bpy_types_dic
if (base && base != srna) {
// printf("debug subtype %s %p\n", RNA_struct_identifier(srna), srna);
py_base = pyrna_srna_Subtype(base); //, bpy_types_dict);
Py_DECREF(py_base); /* Srna owns, this is only to pass as an arg. */
Py_DECREF(py_base); /* `srna` owns, this is only to pass as an argument. */
}
if (py_base == NULL) {
@@ -8846,7 +8846,7 @@ static void bpy_class_free(void *pyob_ptr)
}
/**
* \note This isn't essential to run on startup, since subtypes will lazy initialize.
* \note This isn't essential to run on startup, since sub-types will lazy initialize.
* But keep running in debug mode so we get immediate notification of bad class hierarchy
* or any errors in "bpy_types.py" at load time, so errors don't go unnoticed.
*/

View File

@@ -218,11 +218,13 @@ void pyrna_struct_type_extend_capi(struct StructRNA *srna,
struct PyMethodDef *py_method,
struct PyGetSetDef *py_getset);
/* called before stopping python */
/* Called before stopping Python. */
void pyrna_alloc_types(void);
void pyrna_free_types(void);
/* primitive type conversion */
/* Primitive type conversion. */
int pyrna_py_to_array(
PointerRNA *ptr, PropertyRNA *prop, char *param_data, PyObject *py, const char *error_prefix);
int pyrna_py_to_array_index(PointerRNA *ptr,

View File

@@ -86,7 +86,7 @@ static PyTypeObject bpy_rna_data_context_Type = {
NULL, /* ternaryfunc tp_call; */
NULL, /* reprfunc tp_str; */
/* will only use these if this is a subtype of a py class */
/* Will only use these if this is a sub-type of a Python class. */
NULL, /* getattrofunc tp_getattro; */
NULL, /* setattrofunc tp_setattro; */

View File

@@ -25,7 +25,7 @@ static const char *traceback_filepath(PyTracebackObject *tb, PyObject **coerce)
return PyBytes_AS_STRING(*coerce);
}
/* copied from pythonrun.c, 3.10.0 */
/* Copied from `pythonrun.c`, 3.10.0 */
_Py_static_string(PyId_string, "<string>");
static int parse_syntax_error(PyObject *err,