Skip to content

Commit 5c7f132

Browse files
committed
Cleaned out some dead code
1 parent 77032df commit 5c7f132

File tree

2 files changed

+0
-67
lines changed

2 files changed

+0
-67
lines changed

context.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -669,18 +669,6 @@ context_getattro(PyObject *self, PyObject *nameobj)
669669
}
670670
return PyString_FromString((char *)version_string->data);
671671
}
672-
#if 0
673-
if (!strncmp(attrname, "resolver_type", strlen("resolver_type"))) {
674-
uint32_t resolver_type;
675-
if ((ret = getdns_dict_get_int(api_info, "resolver_type", &resolver_type)) != GETDNS_RETURN_GOOD) {
676-
char err_buf[256];
677-
getdns_strerror(ret, err_buf, sizeof err_buf);
678-
PyErr_SetString(getdns_error, err_buf);
679-
return NULL;
680-
}
681-
return PyInt_FromLong(resolver_type);
682-
}
683-
#endif
684672

685673
if (!strncmp(attrname, "timeout", strlen("timeout"))) {
686674
uint32_t timeout;

getdns.c

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ callback_shim(getdns_context *context, getdns_callback_type_t type, getdns_dict
179179
state = PyGILState_Ensure();
180180
PyObject_CallFunction(getdns_runner, "OHOsl", context, type, response,
181181
callback_data->userarg, tid);
182-
PyObject_CallFunction(getdns_runner, "s", "asdfasdf");
183182
PyGILState_Release(state);
184183
}
185184

@@ -1451,56 +1450,6 @@ ctx_get_api_information(PyObject *self, PyObject *args, PyObject *keywds)
14511450
}
14521451

14531452

1454-
/*
1455-
* Implements the replies_tree for the getDns API
1456-
* Returns a PyObject with the response.
1457-
*/
1458-
static PyObject *
1459-
replies_tree(PyObject *self, PyObject *args, PyObject *keywds)
1460-
{
1461-
static char *kwlist[] = {
1462-
"context",
1463-
"name",
1464-
"request_type",
1465-
"extensions",
1466-
"callback",
1467-
0
1468-
};
1469-
1470-
PyObject *context_capsule;
1471-
struct getdns_context *context;
1472-
char *name;
1473-
uint16_t request_type;
1474-
PyDictObject *extensions_obj;
1475-
struct getdns_dict *extensions_dict;
1476-
int callback = 0;
1477-
getdns_return_t ret;
1478-
struct getdns_dict *resp = 0;
1479-
1480-
if (!PyArg_ParseTupleAndKeywords(args, keywds, "OsH|OO" , kwlist,
1481-
&context_capsule, &name, &request_type,
1482-
&extensions_obj, &callback)) {
1483-
PyErr_SetString(getdns_error, GETDNS_RETURN_INVALID_PARAMETER_TEXT);
1484-
return NULL;
1485-
}
1486-
context = PyCapsule_GetPointer(context_capsule, "context");
1487-
if ((extensions_dict = extensions_to_getdnsdict(extensions_obj)) == 0) {
1488-
PyErr_SetString(getdns_error, "Dictionary parse failure");
1489-
return NULL;
1490-
}
1491-
if ((ret = getdns_general_sync(context, name, request_type,
1492-
extensions_dict, &resp))
1493-
!= GETDNS_RETURN_GOOD) {
1494-
//TODO: refine error handling consistently thru the app, a error handler
1495-
// with helpful messages.
1496-
char err_buf[255];
1497-
getdns_strerror(ret, err_buf, sizeof err_buf);
1498-
PyErr_SetString(getdns_error, err_buf);
1499-
return NULL;
1500-
}
1501-
return getFullResponse(resp);
1502-
}
1503-
15041453

15051454

15061455
static struct PyMethodDef getdns_methods[] = {
@@ -1509,7 +1458,6 @@ static struct PyMethodDef getdns_methods[] = {
15091458
{ "address", (PyCFunction)address, METH_KEYWORDS },
15101459
{ "service", (PyCFunction)service, METH_KEYWORDS },
15111460
{ "hostname", (PyCFunction)hostname, METH_KEYWORDS },
1512-
{ "replies_tree", (PyCFunction)replies_tree, METH_KEYWORDS },
15131461
{ "cancel_callback", (PyCFunction)cancel_callback, METH_KEYWORDS },
15141462
{ "context_set_namespaces", (PyCFunction)ctx_set_namespaces, METH_KEYWORDS },
15151463
{ "context_set_resolution_type", (PyCFunction)ctx_set_resolution_type, METH_KEYWORDS },
@@ -1535,9 +1483,6 @@ static struct PyMethodDef getdns_methods[] = {
15351483
};
15361484

15371485

1538-
1539-
1540-
15411486
PyMODINIT_FUNC
15421487
initgetdns(void)
15431488
{

0 commit comments

Comments
 (0)