*/
#include "includes.h"
-#include <Python.h>
+#include "../lib/util/python_util.h"
#include "libcli/util/pyerrors.h"
#include "lib/registry/registry.h"
#include "scripting/python/modules.h" /* for py_iconv_convenience() */
result = reg_key_del_abs(ctx, path);
PyErr_WERROR_IS_ERR_RAISE(result);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_get_predefined_key(PyObject *self, PyObject *args)
result = reg_diff_apply(ctx, py_iconv_convenience(NULL), filename);
PyErr_WERROR_IS_ERR_RAISE(result);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_mount_hive(PyObject *self, PyObject *args)
result = reg_mount_hive(ctx, py_talloc_get_ptr(py_hivekey), hkey, elements);
PyErr_WERROR_IS_ERR_RAISE(result);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *registry_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
PyErr_WERROR_IS_ERR_RAISE(result);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_hive_key_flush(PyObject *self)
result = hive_key_flush(key);
PyErr_WERROR_IS_ERR_RAISE(result);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_hive_key_del_value(PyObject *self, PyObject *args)
PyErr_WERROR_IS_ERR_RAISE(result);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_hive_key_set_value(PyObject *self, PyObject *args)
PyErr_WERROR_IS_ERR_RAISE(result);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyMethodDef hive_key_methods[] = {
static PyObject *hive_open(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
/* reg_open_hive */
- return Py_None;
+ Py_RETURN_NONE;
}
PyTypeObject PyHiveKey = {
str = reg_get_predef_name(hkey);
if (str == NULL)
- return Py_None;
+ Py_RETURN_NONE;
return PyString_FromString(str);
}