Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-10-10 10:19:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-10-10 14:04:51 +0300
commit2abfcebb0eb7989e3d1e7d03f37ecf5c088210af (patch)
treee7a1ad5912b4661d4ece743f4f7fd86e6bf4d3c4 /source/blender/python
parentc735aca42e9f5961fec7e5d5fc196b5bd6b85f56 (diff)
Cleanup: use C comments for descriptive text
Follow our code style guide by using C-comments for text descriptions.
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/BPY_extern.h2
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_customdata.c2
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_meshdata.c6
-rw-r--r--source/blender/python/generic/py_capi_utils.c6
-rw-r--r--source/blender/python/intern/bpy.c2
-rw-r--r--source/blender/python/intern/bpy_app_ffmpeg.c2
-rw-r--r--source/blender/python/intern/bpy_app_sdl.c4
-rw-r--r--source/blender/python/intern/bpy_driver.c4
-rw-r--r--source/blender/python/intern/bpy_interface.c2
-rw-r--r--source/blender/python/intern/bpy_rna.c9
-rw-r--r--source/blender/python/mathutils/mathutils.c2
11 files changed, 23 insertions, 18 deletions
diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h
index 6632f9ae3cd..6ed403bb21a 100644
--- a/source/blender/python/BPY_extern.h
+++ b/source/blender/python/BPY_extern.h
@@ -69,7 +69,7 @@ void BPY_thread_restore(BPy_ThreadStatePtr tstate);
void BPY_text_free_code(struct Text *text);
void BPY_modules_update(
- struct bContext *C); // XXX - annoying, need this for pointers that get out of date
+ struct bContext *C); /* XXX - annoying, need this for pointers that get out of date */
void BPY_modules_load_user(struct bContext *C);
void BPY_app_handlers_reset(const short do_all);
diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c
index a74be2b580e..96c36f2d788 100644
--- a/source/blender/python/bmesh/bmesh_py_types_customdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c
@@ -98,7 +98,7 @@ PyDoc_STRVAR(bpy_bmlayeraccess_collection__string_doc,
":class:`BMLayerCollection`");
PyDoc_STRVAR(bpy_bmlayeraccess_collection__deform_doc,
"Vertex deform weight :class:`BMDeformVert` (TODO).\n\ntype: "
- ":class:`BMLayerCollection`" // TYPE DOESN'T EXIST YET
+ ":class:`BMLayerCollection`" /* TYPE DOESN'T EXIST YET */
);
PyDoc_STRVAR(
bpy_bmlayeraccess_collection__shape_doc,
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
index 8214be3bd73..c43e5bb4d97 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
@@ -120,7 +120,7 @@ static void bm_init_types_bmloopuv(void)
BPy_BMLoopUV_Type.tp_name = "BMLoopUV";
- BPy_BMLoopUV_Type.tp_doc = NULL; // todo
+ BPy_BMLoopUV_Type.tp_doc = NULL; /* todo */
BPy_BMLoopUV_Type.tp_getset = bpy_bmloopuv_getseters;
@@ -233,7 +233,7 @@ static void bm_init_types_bmvertskin(void)
BPy_BMVertSkin_Type.tp_name = "BMVertSkin";
- BPy_BMVertSkin_Type.tp_doc = NULL; // todo
+ BPy_BMVertSkin_Type.tp_doc = NULL; /* todo */
BPy_BMVertSkin_Type.tp_getset = bpy_bmvertskin_getseters;
@@ -645,7 +645,7 @@ static void bm_init_types_bmdvert(void)
BPy_BMDeformVert_Type.tp_name = "BMDeformVert";
- BPy_BMDeformVert_Type.tp_doc = NULL; // todo
+ BPy_BMDeformVert_Type.tp_doc = NULL; /* todo */
BPy_BMDeformVert_Type.tp_as_sequence = &bpy_bmdeformvert_as_sequence;
BPy_BMDeformVert_Type.tp_as_mapping = &bpy_bmdeformvert_as_mapping;
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c
index 1531b2e0a11..9bbdaa9d6d9 100644
--- a/source/blender/python/generic/py_capi_utils.c
+++ b/source/blender/python/generic/py_capi_utils.c
@@ -646,10 +646,12 @@ PyObject *PyC_ExceptionBuffer(void)
goto error_cleanup;
}
- Py_INCREF(stdout_backup); // since these were borrowed we don't want them freed when replaced.
+ /* Since these were borrowed we don't want them freed when replaced. */
+ Py_INCREF(stdout_backup);
Py_INCREF(stderr_backup);
- PySys_SetObject("stdout", string_io); // both of these are freed when restoring
+ /* Both of these are freed when restoring. */
+ PySys_SetObject("stdout", string_io);
PySys_SetObject("stderr", string_io);
PyErr_Restore(error_type, error_value, error_traceback);
diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c
index a4a73d2aa75..75314e4e2ea 100644
--- a/source/blender/python/intern/bpy.c
+++ b/source/blender/python/intern/bpy.c
@@ -147,7 +147,7 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec
return list;
}
-// PyDoc_STRVAR(bpy_user_resource_doc[] = // now in bpy/utils.py
+// PyDoc_STRVAR(bpy_user_resource_doc[] = /* now in bpy/utils.py */
static PyObject *bpy_user_resource(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
{
const struct PyC_StringEnumItems type_items[] = {
diff --git a/source/blender/python/intern/bpy_app_ffmpeg.c b/source/blender/python/intern/bpy_app_ffmpeg.c
index fdd09be508a..4e396668450 100644
--- a/source/blender/python/intern/bpy_app_ffmpeg.c
+++ b/source/blender/python/intern/bpy_app_ffmpeg.c
@@ -75,7 +75,7 @@ static PyObject *make_ffmpeg_info(void)
return NULL;
}
-#if 0 // UNUSED
+#if 0 /* UNUSED */
# define SetIntItem(flag) PyStructSequence_SET_ITEM(ffmpeg_info, pos++, PyLong_FromLong(flag))
#endif
#ifndef WITH_FFMPEG
diff --git a/source/blender/python/intern/bpy_app_sdl.c b/source/blender/python/intern/bpy_app_sdl.c
index c8be2c521d3..645119c1c5d 100644
--- a/source/blender/python/intern/bpy_app_sdl.c
+++ b/source/blender/python/intern/bpy_app_sdl.c
@@ -89,7 +89,7 @@ static PyObject *make_sdl_info(void)
SDL_GetVersion(&version);
sdl_available = true;
}
-# else // WITH_SDL_DYNLOAD=OFF
+# else /* WITH_SDL_DYNLOAD=OFF */
sdl_available = true;
# if SDL_MAJOR_VERSION >= 2
SDL_GetVersion(&version);
@@ -107,7 +107,7 @@ static PyObject *make_sdl_info(void)
}
SetObjItem(PyBool_FromLong(sdl_available));
-#else // WITH_SDL=OFF
+#else /* WITH_SDL=OFF */
SetObjItem(PyBool_FromLong(0));
SetObjItem(PyC_Tuple_Pack_I32(0, 0, 0));
SetStrItem("Unknown");
diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c
index 8ba468f91e8..c0536693f38 100644
--- a/source/blender/python/intern/bpy_driver.c
+++ b/source/blender/python/intern/bpy_driver.c
@@ -266,7 +266,7 @@ static void pydriver_error(ChannelDriver *driver)
"\nError in Driver: The following Python expression failed:\n\t'%s'\n\n",
driver->expression);
- // BPy_errors_to_report(NULL); // TODO - reports
+ // BPy_errors_to_report(NULL); /* TODO - reports */
PyErr_Print();
PyErr_Clear();
}
@@ -613,7 +613,7 @@ float BPY_driver_exec(struct PathResolvedRNA *anim_rna,
fprintf(
stderr, "\tBPY_driver_eval() - couldn't add variable '%s' to namespace\n", dvar->name);
- // BPy_errors_to_report(NULL); // TODO - reports
+ // BPy_errors_to_report(NULL); /* TODO - reports */
PyErr_Print();
PyErr_Clear();
}
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 0c45a9222ee..f64332d94cc 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -91,7 +91,7 @@ static int py_call_level = 0;
/* Set by command line arguments before Python starts. */
static bool py_use_system_env = false;
-// #define TIME_PY_RUN // simple python tests. prints on exit.
+// #define TIME_PY_RUN /* simple python tests. prints on exit. */
#ifdef TIME_PY_RUN
# include "PIL_time.h"
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 1aad07af591..7796d0a01a1 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -722,7 +722,7 @@ PyObject *pyrna_math_object_from_array(PointerRNA *ptr, PropertyRNA *prop)
}
else {
/* Order will be updated from callback on use. */
- // TODO, get order from RNA
+ /* TODO, get order from RNA. */
PyObject *eul_cb = Euler_CreatePyObject_cb(
ret, EULER_ORDER_XYZ, mathutils_rna_array_cb_index, MATHUTILS_CB_SUBTYPE_EUL);
Py_DECREF(ret); /* The euler owns 'ret' now. */
@@ -6048,7 +6048,7 @@ static PyObject *pyrna_func_call(BPy_FunctionRNA *self, PyObject *args, PyObject
/* enable this so all strings are copied and freed after calling.
* this exposes bugs where the pointer to the string is held and re-used */
- // #define DEBUG_STRING_FREE
+ /* #define DEBUG_STRING_FREE */
#ifdef DEBUG_STRING_FREE
PyObject *string_free_ls = PyList_New(0);
@@ -8820,7 +8820,10 @@ static PyObject *pyrna_register_class(PyObject *UNUSED(self), PyObject *py_class
/* Old srna still references us, keep the check in case registering somehow can free it. */
if (RNA_struct_py_type_get(srna)) {
RNA_struct_py_type_set(srna, NULL);
- // Py_DECREF(py_class); /* Should be able to do this XXX since the old RNA adds a new ref. */
+#if 0
+ /* Should be able to do this XXX since the old RNA adds a new ref. */
+ Py_DECREF(py_class);
+#endif
}
/* Can't use this because it returns a dict proxy
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index 704aade6d94..1616bbeeea9 100644
--- a/source/blender/python/mathutils/mathutils.c
+++ b/source/blender/python/mathutils/mathutils.c
@@ -727,7 +727,7 @@ void BaseMathObject_dealloc(BaseMathObject *self)
BaseMathObject_clear(self);
}
- Py_TYPE(self)->tp_free(self); // PyObject_DEL(self); // breaks subtypes
+ Py_TYPE(self)->tp_free(self); // PyObject_DEL(self); /* breaks subtypes. */
}
/*----------------------------MODULE INIT-------------------------*/