diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-16 11:13:19 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-16 11:14:33 +0300 |
commit | 95f05a6a4ba66ed5533ad6d35ac92cdbe3aa0690 (patch) | |
tree | 19f81181cb24c931c7e006822cf3fe2f39955866 /source/blender/python/intern | |
parent | 48d7ff68f0df209c77bbb081ab46fbc109fd825a (diff) |
Cleanup: spelling in comments
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/bpy_app.c | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_library_load.c | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 8 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.h | 6 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna_data.c | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_traceback.c | 2 |
6 files changed, 12 insertions, 10 deletions
diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c index a0129157b95..70cf231bc26 100644 --- a/source/blender/python/intern/bpy_app.c +++ b/source/blender/python/intern/bpy_app.c @@ -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(); diff --git a/source/blender/python/intern/bpy_library_load.c b/source/blender/python/intern/bpy_library_load.c index 9754599eeed..f29a8d34359 100644 --- a/source/blender/python/intern/bpy_library_load.c +++ b/source/blender/python/intern/bpy_library_load.c @@ -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; */ diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 941e0adfc1d..f6e8f2f88ec 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -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. */ diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h index 91fa0ea2c8d..d7778da6213 100644 --- a/source/blender/python/intern/bpy_rna.h +++ b/source/blender/python/intern/bpy_rna.h @@ -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, diff --git a/source/blender/python/intern/bpy_rna_data.c b/source/blender/python/intern/bpy_rna_data.c index cc0b4aa57d5..a3e865f4846 100644 --- a/source/blender/python/intern/bpy_rna_data.c +++ b/source/blender/python/intern/bpy_rna_data.c @@ -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; */ diff --git a/source/blender/python/intern/bpy_traceback.c b/source/blender/python/intern/bpy_traceback.c index 1f2458c752f..428263fd4c4 100644 --- a/source/blender/python/intern/bpy_traceback.c +++ b/source/blender/python/intern/bpy_traceback.c @@ -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, |