Cleanup: force wrapping all uses of PyDoc_STRVAR
Without this, minor edits can re-indent the whole doc-string at a different level, causing diffs to be unnecessary noisy.
This commit is contained in:
@@ -23,52 +23,60 @@ extern "C" {
|
||||
|
||||
//------------------------ MODULE FUNCTIONS ----------------------------------
|
||||
|
||||
static char ContextFunctions_get_time_stamp___doc__[] =
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
ContextFunctions_get_time_stamp___doc__,
|
||||
".. function:: get_time_stamp()\n"
|
||||
"\n"
|
||||
" Returns the system time stamp.\n"
|
||||
"\n"
|
||||
" :return: The system time stamp.\n"
|
||||
" :rtype: int\n";
|
||||
" :rtype: int\n");
|
||||
|
||||
static PyObject *ContextFunctions_get_time_stamp(PyObject * /*self*/)
|
||||
{
|
||||
return PyLong_FromLong(ContextFunctions::GetTimeStampCF());
|
||||
}
|
||||
|
||||
static char ContextFunctions_get_canvas_width___doc__[] =
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
ContextFunctions_get_canvas_width___doc__,
|
||||
".. method:: get_canvas_width()\n"
|
||||
"\n"
|
||||
" Returns the canvas width.\n"
|
||||
"\n"
|
||||
" :return: The canvas width.\n"
|
||||
" :rtype: int\n";
|
||||
" :rtype: int\n");
|
||||
|
||||
static PyObject *ContextFunctions_get_canvas_width(PyObject * /*self*/)
|
||||
{
|
||||
return PyLong_FromLong(ContextFunctions::GetCanvasWidthCF());
|
||||
}
|
||||
|
||||
static char ContextFunctions_get_canvas_height___doc__[] =
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
ContextFunctions_get_canvas_height___doc__,
|
||||
".. method:: get_canvas_height()\n"
|
||||
"\n"
|
||||
" Returns the canvas height.\n"
|
||||
"\n"
|
||||
" :return: The canvas height.\n"
|
||||
" :rtype: int\n";
|
||||
" :rtype: int\n");
|
||||
|
||||
static PyObject *ContextFunctions_get_canvas_height(PyObject * /*self*/)
|
||||
{
|
||||
return PyLong_FromLong(ContextFunctions::GetCanvasHeightCF());
|
||||
}
|
||||
|
||||
static char ContextFunctions_get_border___doc__[] =
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
ContextFunctions_get_border___doc__,
|
||||
".. method:: get_border()\n"
|
||||
"\n"
|
||||
" Returns the border.\n"
|
||||
"\n"
|
||||
" :return: A tuple of 4 numbers (xmin, ymin, xmax, ymax).\n"
|
||||
" :rtype: tuple\n";
|
||||
" :rtype: tuple\n");
|
||||
|
||||
static PyObject *ContextFunctions_get_border(PyObject * /*self*/)
|
||||
{
|
||||
@@ -82,7 +90,9 @@ static PyObject *ContextFunctions_get_border(PyObject * /*self*/)
|
||||
return v;
|
||||
}
|
||||
|
||||
static char ContextFunctions_load_map___doc__[] =
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
ContextFunctions_load_map___doc__,
|
||||
".. function:: load_map(file_name, map_name, num_levels=4, sigma=1.0)\n"
|
||||
"\n"
|
||||
" Loads an image map for further reading.\n"
|
||||
@@ -96,7 +106,7 @@ static char ContextFunctions_load_map___doc__[] =
|
||||
" built.\n"
|
||||
" :type num_levels: int\n"
|
||||
" :arg sigma: The sigma value of the gaussian function.\n"
|
||||
" :type sigma: float\n";
|
||||
" :type sigma: float\n");
|
||||
|
||||
static PyObject *ContextFunctions_load_map(PyObject * /*self*/, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
@@ -114,7 +124,9 @@ static PyObject *ContextFunctions_load_map(PyObject * /*self*/, PyObject *args,
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
static char ContextFunctions_read_map_pixel___doc__[] =
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
ContextFunctions_read_map_pixel___doc__,
|
||||
".. function:: read_map_pixel(map_name, level, x, y)\n"
|
||||
"\n"
|
||||
" Reads a pixel in a user-defined map.\n"
|
||||
@@ -131,7 +143,7 @@ static char ContextFunctions_read_map_pixel___doc__[] =
|
||||
" is in the lower-left corner.\n"
|
||||
" :type y: int\n"
|
||||
" :return: The floating-point value stored for that pixel.\n"
|
||||
" :rtype: float\n";
|
||||
" :rtype: float\n");
|
||||
|
||||
static PyObject *ContextFunctions_read_map_pixel(PyObject * /*self*/,
|
||||
PyObject *args,
|
||||
@@ -149,7 +161,9 @@ static PyObject *ContextFunctions_read_map_pixel(PyObject * /*self*/,
|
||||
return PyFloat_FromDouble(ContextFunctions::ReadMapPixelCF(mapName, level, x, y));
|
||||
}
|
||||
|
||||
static char ContextFunctions_read_complete_view_map_pixel___doc__[] =
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
ContextFunctions_read_complete_view_map_pixel___doc__,
|
||||
".. function:: read_complete_view_map_pixel(level, x, y)\n"
|
||||
"\n"
|
||||
" Reads a pixel in the complete view map.\n"
|
||||
@@ -164,7 +178,7 @@ static char ContextFunctions_read_complete_view_map_pixel___doc__[] =
|
||||
" is in the lower-left corner.\n"
|
||||
" :type y: int\n"
|
||||
" :return: The floating-point value stored for that pixel.\n"
|
||||
" :rtype: float\n";
|
||||
" :rtype: float\n");
|
||||
|
||||
static PyObject *ContextFunctions_read_complete_view_map_pixel(PyObject * /*self*/,
|
||||
PyObject *args,
|
||||
@@ -180,7 +194,9 @@ static PyObject *ContextFunctions_read_complete_view_map_pixel(PyObject * /*self
|
||||
return PyFloat_FromDouble(ContextFunctions::ReadCompleteViewMapPixelCF(level, x, y));
|
||||
}
|
||||
|
||||
static char ContextFunctions_read_directional_view_map_pixel___doc__[] =
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
ContextFunctions_read_directional_view_map_pixel___doc__,
|
||||
".. function:: read_directional_view_map_pixel(orientation, level, x, y)\n"
|
||||
"\n"
|
||||
" Reads a pixel in one of the oriented view map images.\n"
|
||||
@@ -198,7 +214,7 @@ static char ContextFunctions_read_directional_view_map_pixel___doc__[] =
|
||||
" is in the lower-left corner.\n"
|
||||
" :type y: int\n"
|
||||
" :return: The floating-point value stored for that pixel.\n"
|
||||
" :rtype: float\n";
|
||||
" :rtype: float\n");
|
||||
|
||||
static PyObject *ContextFunctions_read_directional_view_map_pixel(PyObject * /*self*/,
|
||||
PyObject *args,
|
||||
@@ -217,13 +233,15 @@ static PyObject *ContextFunctions_read_directional_view_map_pixel(PyObject * /*s
|
||||
ContextFunctions::ReadDirectionalViewMapPixelCF(orientation, level, x, y));
|
||||
}
|
||||
|
||||
static char ContextFunctions_get_selected_fedge___doc__[] =
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
ContextFunctions_get_selected_fedge___doc__,
|
||||
".. function:: get_selected_fedge()\n"
|
||||
"\n"
|
||||
" Returns the selected FEdge.\n"
|
||||
"\n"
|
||||
" :return: The selected FEdge.\n"
|
||||
" :rtype: :class:`FEdge`\n";
|
||||
" :rtype: :class:`FEdge`\n");
|
||||
|
||||
static PyObject *ContextFunctions_get_selected_fedge(PyObject * /*self*/)
|
||||
{
|
||||
@@ -236,7 +254,11 @@ static PyObject *ContextFunctions_get_selected_fedge(PyObject * /*self*/)
|
||||
|
||||
/*-----------------------ContextFunctions module docstring-------------------------------*/
|
||||
|
||||
static char module_docstring[] = "The Blender Freestyle.ContextFunctions submodule\n\n";
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
module_docstring,
|
||||
"The Blender Freestyle.ContextFunctions submodule\n"
|
||||
"\n");
|
||||
|
||||
/*-----------------------ContextFunctions module functions definitions-------------------*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user