PyDataSourceClient_ToDataSourceClient(PyObject* client_obj) {
if (client_obj == NULL) {
isc_throw(PyCPPWrapperException,
- "obj argument NULL in Name PyObject conversion");
+ "argument NULL in DataSourceClient PyObject conversion");
}
- const s_DataSourceClient* client =
- static_cast<const s_DataSourceClient*>(client_obj);
+ s_DataSourceClient* client = static_cast<s_DataSourceClient*>(client_obj);
return (*client->client);
}
LifeKeeper>& life_keeper = boost::shared_ptr<ClientList::
FindResult::LifeKeeper>());
+/// \brief Returns a reference to the DataSourceClient object contained
+/// in the given Python object.
+///
+/// \note The given object MUST be of type DataSourceClient; this can be
+/// checked with the right call to ParseTuple("O!")
+///
+/// \param client_obj Python object holding the DataSourceClient
+/// \return reference to the DataSourceClient object
DataSourceClient&
PyDataSourceClient_ToDataSourceClient(PyObject* client_obj);
&po_target_client, &name_type, &po_name,
&datasourceclient_type, &po_source_client)
) {
+ PyErr_SetString(PyExc_TypeError,
+ "Invalid arguments to ZoneLoader constructor, "
+ "expects isc.datasrc.DataSourceClient, isc.dns.Name, "
+ "and either a string or another DataSourceClient");
return (-1);
}
PyErr_Clear();
return (NULL);
}
try {
- const bool complete = self->cppobj->loadIncremental(limit);
- if (complete) {
+ if (self->cppobj->loadIncremental(limit)) {
Py_RETURN_TRUE;
} else {
Py_RETURN_FALSE;