| 751 | "appended to on writes."); |
| 752 | |
| 753 | PyObject * |
| 754 | RefdbBackend_ensure_log(RefdbBackend *self, PyObject *_ref_name) |
| 755 | { |
| 756 | int err; |
| 757 | const char *ref_name; |
| 758 | if (self->refdb_backend->ensure_log == NULL) { |
| 759 | Py_INCREF(Py_NotImplemented); |
| 760 | return Py_NotImplemented; |
| 761 | } |
| 762 | |
| 763 | if (!PyUnicode_Check(_ref_name)) { |
| 764 | PyErr_SetString(PyExc_TypeError, |
| 765 | "RefdbBackend.ensure_log takes a string argument"); |
| 766 | return NULL; |
| 767 | } |
| 768 | ref_name = PyUnicode_AsUTF8(_ref_name); |
| 769 | |
| 770 | err = self->refdb_backend->ensure_log(self->refdb_backend, ref_name); |
| 771 | if (err < 0) { |
| 772 | return Error_set(err); |
| 773 | } |
| 774 | |
| 775 | if (err == 0) { |
| 776 | Py_RETURN_TRUE; |
| 777 | } else { |
| 778 | Py_RETURN_FALSE; |
| 779 | } |
| 780 | } |
| 781 | |
| 782 | static PyMethodDef RefdbBackend_methods[] = { |
| 783 | METHOD(RefdbBackend, exists, METH_O), |
nothing calls this directly
no test coverage detected
searching dependent graphs…