387 static PyObject *
388 Radix_search_exact(RadixObject *self, PyObject *args, PyObject *kw_args)
389 {
390 radix_node_t *node;
391 RadixNodeObject *node_obj;
392 prefix_t *prefix;
393 static char *keywords[] = { "network", "masklen", "packed", NULL };
394
395 char *addr = NULL, *packed = NULL;
396 long prefixlen = -1;
397 int packlen = -1;
398
399 if (!PyArg_ParseTupleAndKeywords(args, kw_args, "|sls#:search_exact", keywords,
when PyArg_ParseTupleAndKeywords() succeeds
taking False path
400 &addr, &prefixlen, &packed, &packlen))
401 return NULL;
402 if ((prefix = args_to_prefix(addr, packed, packlen, prefixlen)) == NULL)
when treating unknown struct prefix_t * from radix_python.c:402 as NULL
taking True path
403 return NULL;
404
405 node = radix_search_exact(PICKRT(prefix, self), prefix);
406 if (node == NULL || node->data == NULL) {
407 Deref_Prefix(prefix);
408 Py_INCREF(Py_None);
409 return Py_None;
410 }
411 Deref_Prefix(prefix);
412 node_obj = node->data;
413 Py_XINCREF(node_obj);
414 return (PyObject *)node_obj;
415 }
returning (PyObject*)NULL without setting an exception