Fix T88792: WindowManager.clipboard missing in Python API docs

Support RNA types using the Py/C-API PyGetSetDef defined properties.
Currently `WindowManager.clipboard` is the only instance of this.
This commit is contained in:
2022-05-18 21:43:38 +10:00
parent 1fcdb1ea28
commit 136a06285f
3 changed files with 16 additions and 1 deletions

View File

@@ -107,6 +107,7 @@ static struct PyMethodDef pyrna_text_methods[] = {
* and creating the buffer, causing writes past the allocated length.
* \{ */
PyDoc_STRVAR(pyrna_WindowManager_clipboard_doc, "Clipboard text storage.\n\n:type: string");
static PyObject *pyrna_WindowManager_clipboard_get(PyObject *UNUSED(self), void *UNUSED(flag))
{
int text_len = 0;
@@ -154,7 +155,7 @@ static struct PyGetSetDef pyrna_windowmanager_getset[] = {
{"clipboard",
pyrna_WindowManager_clipboard_get,
pyrna_WindowManager_clipboard_set,
NULL,
pyrna_WindowManager_clipboard_doc,
NULL},
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
};