summaryrefslogtreecommitdiff
path: root/source4/lib/registry
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-23 20:56:41 -0600
committerStefan Metzmacher <metze@samba.org>2007-12-24 01:51:04 -0600
commitd0ba9f001474bfee9b1e8fb516effab736cd4050 (patch)
tree1f4f21c4cf230e2438b1a9fac46eab7e7714b5e6 /source4/lib/registry
parent3ee442c54f658e0dc9541a492e46fd8f6bf3a7f4 (diff)
downloadsamba-d0ba9f001474bfee9b1e8fb516effab736cd4050.tar.gz
samba-d0ba9f001474bfee9b1e8fb516effab736cd4050.tar.bz2
samba-d0ba9f001474bfee9b1e8fb516effab736cd4050.zip
r26572: Fix warnings in the Python code.
(This used to be commit 15038d9586d0b58f301ca8c39c21ef10c4283f28)
Diffstat (limited to 'source4/lib/registry')
-rw-r--r--source4/lib/registry/registry.i7
-rw-r--r--source4/lib/registry/registry_wrap.c31
2 files changed, 20 insertions, 18 deletions
diff --git a/source4/lib/registry/registry.i b/source4/lib/registry/registry.i
index 6f46e081c2..20ae671c75 100644
--- a/source4/lib/registry/registry.i
+++ b/source4/lib/registry/registry.i
@@ -26,6 +26,7 @@
#include "includes.h"
#include "registry.h"
#include "param/param.h"
+#include "hive.h"
typedef struct registry_context reg;
typedef struct hive_key hive_key;
@@ -102,16 +103,16 @@ typedef struct registry_context {
WERROR generate_diff(struct registry_context *ctx2, const struct reg_diff_callbacks *callbacks,
void *callback_data);
- WERROR mount_hive(struct hive_key *hive_key, uint32_t hkey_id,
+ WERROR mount_hive(struct hive_key *key, uint32_t hkey_id,
const char **elements=NULL);
struct registry_key *import_hive_key(struct hive_key *hive, uint32_t predef_key, const char **elements);
- WERROR mount_hive(struct hive_key *hive_key, const char *predef_name)
+ WERROR mount_hive(struct hive_key *key, const char *predef_name)
{
int i;
for (i = 0; reg_predefined_keys[i].name; i++) {
if (!strcasecmp(reg_predefined_keys[i].name, predef_name))
- return reg_mount_hive($self, hive_key,
+ return reg_mount_hive($self, key,
reg_predefined_keys[i].handle, NULL);
}
return WERR_INVALID_NAME;
diff --git a/source4/lib/registry/registry_wrap.c b/source4/lib/registry/registry_wrap.c
index 00c7fc32b2..c5741b7e2c 100644
--- a/source4/lib/registry/registry_wrap.c
+++ b/source4/lib/registry/registry_wrap.c
@@ -2529,6 +2529,7 @@ static swig_module_info swig_module = {swig_types, 25, 0, 0, 0, 0};
#include "includes.h"
#include "registry.h"
#include "param/param.h"
+#include "hive.h"
typedef struct registry_context reg;
typedef struct hive_key hive_key;
@@ -2830,11 +2831,11 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
-SWIGINTERN WERROR reg_mount_hive__SWIG_1(reg *self,struct hive_key *hive_key,char const *predef_name){
+SWIGINTERN WERROR reg_mount_hive__SWIG_1(reg *self,struct hive_key *key,char const *predef_name){
int i;
for (i = 0; reg_predefined_keys[i].name; i++) {
if (!strcasecmp(reg_predefined_keys[i].name, predef_name))
- return reg_mount_hive(self, hive_key,
+ return reg_mount_hive(self, key,
reg_predefined_keys[i].handle, NULL);
}
return WERR_INVALID_NAME;
@@ -2949,7 +2950,7 @@ SWIGINTERN PyObject *_wrap_Registry(PyObject *SWIGUNUSEDPARM(self), PyObject *ar
}
result = reg_open_local(arg1,arg2,arg3,arg4);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, win_errstr(result));
+ PyObject *obj = Py_BuildValue((char *)"(i,s)", (&result)->v, win_errstr(result));
PyErr_SetObject(PyExc_RuntimeError, obj);
SWIG_fail;
} else if (resultobj == NULL) {
@@ -3000,7 +3001,7 @@ SWIGINTERN PyObject *_wrap_reg_get_predefined_key_by_name(PyObject *SWIGUNUSEDPA
arg3 = (struct registry_key **)(argp3);
result = reg_get_predefined_key_by_name(arg1,(char const *)arg2,arg3);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, win_errstr(result));
+ PyObject *obj = Py_BuildValue((char *)"(i,s)", (&result)->v, win_errstr(result));
PyErr_SetObject(PyExc_RuntimeError, obj);
SWIG_fail;
} else if (resultobj == NULL) {
@@ -3043,7 +3044,7 @@ SWIGINTERN PyObject *_wrap_reg_key_del_abs(PyObject *SWIGUNUSEDPARM(self), PyObj
arg2 = (char *)(buf2);
result = reg_key_del_abs(arg1,(char const *)arg2);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, win_errstr(result));
+ PyObject *obj = Py_BuildValue((char *)"(i,s)", (&result)->v, win_errstr(result));
PyErr_SetObject(PyExc_RuntimeError, obj);
SWIG_fail;
} else if (resultobj == NULL) {
@@ -3094,7 +3095,7 @@ SWIGINTERN PyObject *_wrap_reg_get_predefined_key(PyObject *SWIGUNUSEDPARM(self)
arg3 = (struct registry_key **)(argp3);
result = reg_get_predefined_key(arg1,arg2,arg3);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, win_errstr(result));
+ PyObject *obj = Py_BuildValue((char *)"(i,s)", (&result)->v, win_errstr(result));
PyErr_SetObject(PyExc_RuntimeError, obj);
SWIG_fail;
} else if (resultobj == NULL) {
@@ -3135,7 +3136,7 @@ SWIGINTERN PyObject *_wrap_reg_diff_apply(PyObject *SWIGUNUSEDPARM(self), PyObje
arg2 = (char *)(buf2);
result = reg_diff_apply(arg1,(char const *)arg2);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, win_errstr(result));
+ PyObject *obj = Py_BuildValue((char *)"(i,s)", (&result)->v, win_errstr(result));
PyErr_SetObject(PyExc_RuntimeError, obj);
SWIG_fail;
} else if (resultobj == NULL) {
@@ -3193,7 +3194,7 @@ SWIGINTERN PyObject *_wrap_reg_generate_diff(PyObject *SWIGUNUSEDPARM(self), PyO
}
result = reg_generate_diff(arg1,arg2,(struct reg_diff_callbacks const *)arg3,arg4);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, win_errstr(result));
+ PyObject *obj = Py_BuildValue((char *)"(i,s)", (&result)->v, win_errstr(result));
PyErr_SetObject(PyExc_RuntimeError, obj);
SWIG_fail;
} else if (resultobj == NULL) {
@@ -3259,7 +3260,7 @@ SWIGINTERN PyObject *_wrap_reg_mount_hive__SWIG_0(PyObject *SWIGUNUSEDPARM(self)
}
result = reg_mount_hive(arg1,arg2,arg3,(char const **)arg4);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, win_errstr(result));
+ PyObject *obj = Py_BuildValue((char *)"(i,s)", (&result)->v, win_errstr(result));
PyErr_SetObject(PyExc_RuntimeError, obj);
SWIG_fail;
} else if (resultobj == NULL) {
@@ -3372,7 +3373,7 @@ SWIGINTERN PyObject *_wrap_reg_mount_hive__SWIG_1(PyObject *SWIGUNUSEDPARM(self)
arg3 = (char *)(buf3);
result = reg_mount_hive__SWIG_1(arg1,arg2,(char const *)arg3);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, win_errstr(result));
+ PyObject *obj = Py_BuildValue((char *)"(i,s)", (&result)->v, win_errstr(result));
PyErr_SetObject(PyExc_RuntimeError, obj);
SWIG_fail;
} else if (resultobj == NULL) {
@@ -3523,7 +3524,7 @@ SWIGINTERN PyObject *_wrap_hive_key(PyObject *SWIGUNUSEDPARM(self), PyObject *ar
}
result = reg_open_hive(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, win_errstr(result));
+ PyObject *obj = Py_BuildValue((char *)"(i,s)", (&result)->v, win_errstr(result));
PyErr_SetObject(PyExc_RuntimeError, obj);
SWIG_fail;
} else if (resultobj == NULL) {
@@ -3600,7 +3601,7 @@ SWIGINTERN PyObject *_wrap_open_ldb(PyObject *SWIGUNUSEDPARM(self), PyObject *ar
}
result = reg_open_ldb_file(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, win_errstr(result));
+ PyObject *obj = Py_BuildValue((char *)"(i,s)", (&result)->v, win_errstr(result));
PyErr_SetObject(PyExc_RuntimeError, obj);
SWIG_fail;
} else if (resultobj == NULL) {
@@ -3641,7 +3642,7 @@ SWIGINTERN PyObject *_wrap_create_dir(PyObject *SWIGUNUSEDPARM(self), PyObject *
arg2 = (char *)(buf2);
result = reg_create_directory(arg1,(char const *)arg2,arg3);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, win_errstr(result));
+ PyObject *obj = Py_BuildValue((char *)"(i,s)", (&result)->v, win_errstr(result));
PyErr_SetObject(PyExc_RuntimeError, obj);
SWIG_fail;
} else if (resultobj == NULL) {
@@ -3682,7 +3683,7 @@ SWIGINTERN PyObject *_wrap_open_dir(PyObject *SWIGUNUSEDPARM(self), PyObject *ar
arg2 = (char *)(buf2);
result = reg_open_directory(arg1,(char const *)arg2,arg3);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, win_errstr(result));
+ PyObject *obj = Py_BuildValue((char *)"(i,s)", (&result)->v, win_errstr(result));
PyErr_SetObject(PyExc_RuntimeError, obj);
SWIG_fail;
} else if (resultobj == NULL) {
@@ -3749,7 +3750,7 @@ SWIGINTERN PyObject *_wrap_open_samba(PyObject *SWIGUNUSEDPARM(self), PyObject *
}
result = reg_open_samba(arg1,arg2,arg3,arg4,arg5);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, win_errstr(result));
+ PyObject *obj = Py_BuildValue((char *)"(i,s)", (&result)->v, win_errstr(result));
PyErr_SetObject(PyExc_RuntimeError, obj);
SWIG_fail;
} else if (resultobj == NULL) {