Cleanup: use C comments for descriptive text
Follow our code style guide by using C-comments for text descriptions.
This commit is contained in:
@@ -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[] = {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user