spelling cleanup

This commit is contained in:
2012-03-18 07:38:51 +00:00
parent e56f714000
commit 4f19c1a995
235 changed files with 512 additions and 511 deletions

View File

@@ -1973,7 +1973,7 @@ static PyObject *bpy_bmelemseq_index_update(BPy_BMElemSeq *self)
}
if (htype & (BM_VERT | BM_EDGE | BM_FACE)) {
/* since this isnt the normal vert/edge/face loops,
/* since this isn't the normal vert/edge/face loops,
* we're setting dirty values here. so tag as dirty. */
bm->elem_index_dirty |= htype;
}
@@ -2248,7 +2248,7 @@ static PyObject *bpy_bmelemseq_subscript_slice(BPy_BMElemSeq *self, Py_ssize_t s
static PyObject *bpy_bmelemseq_subscript(BPy_BMElemSeq *self, PyObject *key)
{
/* dont need error check here */
/* don't need error check here */
if (PyIndex_Check(key)) {
Py_ssize_t i = PyNumber_AsSsize_t(key, PyExc_IndexError);
if (i == -1 && PyErr_Occurred())
@@ -3104,7 +3104,7 @@ void *BPy_BMElem_PySeq_As_Array(BMesh **r_bm, PyObject *seq, Py_ssize_t min, Py_
ok = FALSE;
}
/* ensure we dont leave this enabled */
/* ensure we don't leave this enabled */
BM_elem_flag_disable(alloc[i], BM_ELEM_INTERNAL_TAG);
}

View File

@@ -413,7 +413,7 @@ static PyObject *bpy_bmlayercollection_subscript_slice(BPy_BMLayerCollection *se
static PyObject *bpy_bmlayercollection_subscript(BPy_BMLayerCollection *self, PyObject *key)
{
/* dont need error check here */
/* don't need error check here */
if (PyUnicode_Check(key)) {
return bpy_bmlayercollection_subscript_str(self, _PyUnicode_AsString(key));
}

View File

@@ -247,7 +247,7 @@ static PyObject *bpy_bmeditselseq_subscript_slice(BPy_BMEditSelSeq *self, Py_ssi
static PyObject *bpy_bmeditselseq_subscript(BPy_BMEditSelSeq *self, PyObject *key)
{
/* dont need error check here */
/* don't need error check here */
if (PyIndex_Check(key)) {
Py_ssize_t i = PyNumber_AsSsize_t(key, PyExc_IndexError);
if (i == -1 && PyErr_Occurred())

View File

@@ -329,7 +329,7 @@ PyObject *PyC_ExceptionBuffer(void)
goto error_cleanup;
}
Py_INCREF(stdout_backup); // since these were borrowed we dont want them freed when replaced.
Py_INCREF(stdout_backup); // since these were borrowed we don't want them freed when replaced.
Py_INCREF(stderr_backup);
PySys_SetObject("stdout", string_io); // both of these are freed when restoring
@@ -449,7 +449,7 @@ void PyC_MainModule_Backup(PyObject **main_mod)
{
PyInterpreterState *interp = PyThreadState_GET()->interp;
*main_mod = PyDict_GetItemString(interp->modules, "__main__");
Py_XINCREF(*main_mod); /* dont free */
Py_XINCREF(*main_mod); /* don't free */
}
void PyC_MainModule_Restore(PyObject *main_mod)
@@ -517,7 +517,7 @@ void PyC_RunQuicky(const char *filepath, int n, ...)
int i;
PyObject *py_dict = PyC_DefaultNameSpace(filepath);
PyObject *values = PyList_New(n / 2); /* namespace owns this, dont free */
PyObject *values = PyList_New(n / 2); /* namespace owns this, don't free */
PyObject *py_result, *ret;
@@ -580,7 +580,7 @@ void PyC_RunQuicky(const char *filepath, int n, ...)
if (values && PyList_Check(values)) {
/* dont use the result */
/* don't use the result */
Py_DECREF(py_result);
py_result = NULL;

View File

@@ -70,7 +70,7 @@ int bpy_pydriver_create_dict(void)
mod = PyImport_ImportModule("math");
if (mod) {
PyDict_Merge(d, PyModule_GetDict(mod), 0); /* 0 - dont overwrite existing values */
PyDict_Merge(d, PyModule_GetDict(mod), 0); /* 0 - don't overwrite existing values */
Py_DECREF(mod);
}
@@ -159,14 +159,14 @@ static void pydriver_error(ChannelDriver *driver)
/* This evals py driver expressions, 'expr' is a Python expression that
* should evaluate to a float number, which is returned.
*
* (old)note: PyGILState_Ensure() isnt always called because python can call
* (old)note: PyGILState_Ensure() isn't always called because python can call
* the bake operator which intern starts a thread which calls scene update
* which does a driver update. to avoid a deadlock check PYC_INTERPRETER_ACTIVE
* if PyGILState_Ensure() is needed - see [#27683]
*
* (new)note: checking if python is running is not threadsafe [#28114]
* now release the GIL on python operator execution instead, using
* PyEval_SaveThread() / PyEval_RestoreThread() so we dont lock up blender.
* PyEval_SaveThread() / PyEval_RestoreThread() so we don't lock up blender.
*/
float BPY_driver_exec(ChannelDriver *driver, const float evaltime)
{

View File

@@ -96,7 +96,7 @@ void bpy_context_update(bContext *C)
{
BPy_SetContext(C);
bpy_import_main_set(CTX_data_main(C));
BPY_modules_update(C); /* can give really bad results if this isnt here */
BPY_modules_update(C); /* can give really bad results if this isn't here */
}
void bpy_context_set(bContext *C, PyGILState_STATE *gilstate)
@@ -497,7 +497,7 @@ int BPY_button_exec(bContext *C, const char *expr, double *value, const short ve
mod = PyImport_ImportModule("math");
if (mod) {
PyDict_Merge(py_dict, PyModule_GetDict(mod), 0); /* 0 - dont overwrite existing values */
PyDict_Merge(py_dict, PyModule_GetDict(mod), 0); /* 0 - don't overwrite existing values */
Py_DECREF(mod);
}
else { /* highly unlikely but possibly */
@@ -705,7 +705,7 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult *
#ifdef WITH_PYTHON_MODULE
#include "BLI_fileops.h"
/* TODO, reloading the module isnt functional at the moment. */
/* TODO, reloading the module isn't functional at the moment. */
static void bpy_module_free(void *mod);
extern int main_python_enter(int argc, const char **argv);
@@ -782,7 +782,7 @@ PyInit_bpy(void)
* we may end up having to rename this module so there is no naming conflict here eg:
* 'from blender import bpy'
*
* 3) we dont know the filename at this point, workaround by assigning a dummy value
* 3) we don't know the filename at this point, workaround by assigning a dummy value
* which calls back when its freed so the real loading can take place.
*/

View File

@@ -62,7 +62,7 @@ static void atexit_func_call(const char *func_name, PyObject *atexit_func_arg)
PyObject *ret;
PyTuple_SET_ITEM(args, 0, atexit_func_arg);
Py_INCREF(atexit_func_arg); /* only incref so we dont dec'ref along with 'args' */
Py_INCREF(atexit_func_arg); /* only incref so we don't dec'ref along with 'args' */
ret = PyObject_CallObject(atexit_func, args);

View File

@@ -431,7 +431,7 @@ int bpy_lib_init(PyObject *mod_par)
PyModule_AddObject(mod_par, "_library_load", PyCFunction_New(&load_meth, NULL));
/* some compilers dont like accessing this directly, delay assignment */
/* some compilers don't like accessing this directly, delay assignment */
bpy_lib_Type.tp_getattro = PyObject_GenericGetAttr;
if (PyType_Ready(&bpy_lib_Type) < 0)

View File

@@ -225,7 +225,7 @@ static PyObject *pyop_call(PyObject *UNUSED(self), PyObject *args)
ReportList *reports;
reports = MEM_mallocN(sizeof(ReportList), "wmOperatorReportList");
BKE_reports_init(reports, RPT_STORE | RPT_OP_HOLD); /* own so these dont move into global reports */
BKE_reports_init(reports, RPT_STORE | RPT_OP_HOLD); /* own so these don't move into global reports */
#ifdef BPY_RELEASE_GIL
/* release GIL, since a thread could be started from an operator

View File

@@ -372,7 +372,7 @@ static int bpy_struct_id_used(StructRNA *srna, char *identifier)
/* Function that sets RNA, NOTE - self is NULL when called from python,
* but being abused from C so we can pass the srna along.
* This isnt incorrect since its a python object - but be careful */
* This isn't incorrect since its a python object - but be careful */
PyDoc_STRVAR(BPy_BoolProperty_doc,
".. function:: BoolProperty(name=\"\", "
"description=\"\", "
@@ -1039,7 +1039,7 @@ static EnumPropertyItem *enum_items_from_py(PyObject *seq_fast, PyObject *def, i
(tmp.identifier = _PyUnicode_AsStringAndSize(PyTuple_GET_ITEM(item, 0), &id_str_size)) &&
(tmp.name = _PyUnicode_AsStringAndSize(PyTuple_GET_ITEM(item, 1), &name_str_size)) &&
(tmp.description = _PyUnicode_AsStringAndSize(PyTuple_GET_ITEM(item, 2), &desc_str_size)) &&
/* TODO, number isnt 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) != -1))
{
if (is_enum_flag) {
@@ -1260,7 +1260,7 @@ static PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw)
}
/* items can be a list or a callable */
if (PyFunction_Check(items)) { /* dont use PyCallable_Check because we need the function code for errors */
if (PyFunction_Check(items)) { /* don't use PyCallable_Check because we need the function code for errors */
PyCodeObject *f_code = (PyCodeObject *)PyFunction_GET_CODE(items);
if (f_code->co_argcount != 2) {
PyErr_Format(PyExc_ValueError,

View File

@@ -4175,7 +4175,7 @@ static void foreach_attr_type(BPy_PropertyRNA *self, const char *attr,
*attr_tot = 0;
*attr_signed = FALSE;
/* note: this is fail with zero length lists, so dont let this get caled in that case */
/* note: this is fail with zero length lists, so don't let this get caled in that case */
RNA_PROP_BEGIN(&self->ptr, itemptr, self->prop) {
prop = RNA_struct_find_property(&itemptr, attr);
*raw_type = RNA_property_raw_type(prop);
@@ -4236,7 +4236,7 @@ static int foreach_parse_args(
#endif
}
/* check 'attr_tot' otherwise we dont know if any values were set
/* check 'attr_tot' otherwise we don't know if any values were set
* this isn't ideal because it means running on an empty list may fail silently when its not compatible. */
if (*size == 0 && *attr_tot != 0) {
PyErr_SetString(PyExc_AttributeError, "attribute does not support foreach method");
@@ -4993,7 +4993,7 @@ static PyObject *pyrna_func_call(BPy_FunctionRNA *self, PyObject *args, PyObject
/* Check if we gave args that don't exist in the function
* printing the error is slow but it should only happen when developing.
* the if below is quick, checking if it passed less keyword args then we gave.
* (Dont overwrite the error if we have one, otherwise can skip important messages and confuse with args)
* (Don't overwrite the error if we have one, otherwise can skip important messages and confuse with args)
*/
if (err == 0 && kw && (pykw_len > kw_tot)) {
PyObject *key, *value;
@@ -6606,7 +6606,7 @@ static int pyrna_deferred_register_class_recursive(StructRNA *srna, PyTypeObject
int pyrna_deferred_register_class(StructRNA *srna, PyObject *py_class)
{
/* Panels and Menus dont need this
/* Panels and Menus don't need this
* save some time and skip the checks here */
if (!RNA_struct_idprops_register_check(srna))
return 0;
@@ -6704,7 +6704,7 @@ static int bpy_class_validate(PointerRNA *dummyptr, void *py_data, int *have_fun
func_arg_count = rna_function_arg_count(func);
if (func_arg_count >= 0) { /* -1 if we dont care*/
if (func_arg_count >= 0) { /* -1 if we don't care*/
arg_count = ((PyCodeObject *)PyFunction_GET_CODE(item))->co_argcount;
/* note, the number of args we check for and the number of args we give to

View File

@@ -137,7 +137,7 @@ PyObject *pyrna_callback_remove(BPy_StructRNA *self, PyObject *args)
ED_region_draw_cb_exit(((ARegion *)self->ptr.data)->type, handle);
}
/* dont allow reuse */
/* don't allow reuse */
PyCapsule_SetName(py_handle, RNA_CAPSULE_ID_INVALID);
Py_RETURN_NONE;

View File

@@ -504,7 +504,7 @@ static PyObject *Color_mul(PyObject *v1, PyObject *v2)
/* make sure v1 is always the vector */
if (color1 && color2) {
/* col * col, dont support yet! */
/* col * col, don't support yet! */
}
else if (color1) {
if (((scalar = PyFloat_AsDouble(v2)) == -1.0f && PyErr_Occurred()) == 0) { /* COLOR * FLOAT */

View File

@@ -1063,7 +1063,7 @@ static PyObject *M_Geometry_tesselate_polygon(PyObject *UNUSED(self), PyObject *
}
len_polypoints = PySequence_Size(polyLine);
if (len_polypoints > 0) { /* dont bother adding edges as polylines */
if (len_polypoints > 0) { /* don't bother adding edges as polylines */
#if 0
if (EXPP_check_sequence_consistency(polyLine, &vector_Type) != 1) {
freedisplist(&dispbase);
@@ -1141,7 +1141,7 @@ static PyObject *M_Geometry_tesselate_polygon(PyObject *UNUSED(self), PyObject *
freedisplist(&dispbase);
}
else {
/* no points, do this so scripts dont barf */
/* no points, do this so scripts don't barf */
freedisplist(&dispbase); /* possible some dl was allocated */
tri_list = PyList_New(0);
}