| 561 | } |
| 562 | |
| 563 | int FeaturePythonImp::canLoadPartial() const |
| 564 | { |
| 565 | _FC_PY_CALL_CHECK(canLoadPartial, return (-1)); |
| 566 | Base::PyGILStateLocker lock; |
| 567 | try { |
| 568 | Py::Tuple args(1); |
| 569 | args.setItem(0, Py::Object(object->getPyObject(), true)); |
| 570 | Py::Long ret(Base::pyCall(py_canLoadPartial.ptr(), args.ptr())); |
| 571 | return ret; |
| 572 | } |
| 573 | catch (Py::Exception&) { |
| 574 | if (PyErr_ExceptionMatches(PyExc_NotImplementedError)) { |
| 575 | PyErr_Clear(); |
| 576 | return -1; |
| 577 | } |
| 578 | Base::PyException e; // extract the Python error text |
| 579 | e.reportException(); |
| 580 | return 0; |
| 581 | } |
| 582 | } |
| 583 | |
| 584 | FeaturePythonImp::ValueT FeaturePythonImp::supportsAsyncRecompute() const |
| 585 | { |
no test coverage detected