Пример #1
0
int
do_hivex_node_delete_child (int64_t nodeh)
{
  NEED_HANDLE (-1);

  if (hivex_node_delete_child (h, nodeh) == -1) {
    reply_with_perror ("failed");
    return -1;
  }

  return 0;
}
Пример #2
0
static PyObject *
py_hivex_node_delete_child (PyObject *self, PyObject *args)
{
  PyObject *py_r;
  int r;
  hive_h *h;
  PyObject *py_h;
  long node;

  if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_node_delete_child", &py_h, &node))
    return NULL;
  h = get_handle (py_h);
  r = hivex_node_delete_child (h, node);
  if (r == -1) {
    PyErr_SetString (PyExc_RuntimeError,
                     strerror (errno));
    return NULL;
  }

  Py_INCREF (Py_None);
  py_r = Py_None;
  return py_r;
}