| 430 | Py_Return; |
| 431 | } |
| 432 | PY_CATCH |
| 433 | } |
| 434 | |
| 435 | |
| 436 | PyObject* PropertyContainerPy::getDocumentationOfProperty(PyObject* args) |
| 437 | { |
| 438 | char* pstr {}; |
| 439 | if (!PyArg_ParseTuple(args, "s", &pstr)) { |
| 440 | return nullptr; |
| 441 | } |
| 442 | |
| 443 | Property* prop = getPropertyContainerPtr()->getPropertyByName(pstr); |
| 444 | if (!prop) { |
| 445 | PyErr_Format(PyExc_AttributeError, "Property container has no property '%s'", pstr); |
| 446 | return nullptr; |
| 447 | } |
| 448 | |
| 449 | const char* docstr = getPropertyContainerPtr()->getPropertyDocumentation(prop); |
| 450 | if (docstr) { |
| 451 | return Py::new_reference_to(Py::String(docstr)); |
| 452 | } |
| 453 | else { |
| 454 | return Py::new_reference_to(Py::String("")); |
| 455 | } |
| 456 | } |
| 457 | |
| 458 | PyObject* PropertyContainerPy::setDocumentationOfProperty(PyObject* args) |
| 459 | { |
nothing calls this directly
no test coverage detected