diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-08-08 14:30:00 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-08-08 16:45:27 +0200 |
commit | 3b11ee1db1bbe966900fc917e3358937d1b23d62 (patch) | |
tree | 85ee82ba79d6f076af08b39e5de93fffc17b5b43 /source4/lib | |
parent | 100565b8cce0c0e843bdd4158bc4047f346037fd (diff) | |
download | samba-3b11ee1db1bbe966900fc917e3358937d1b23d62.tar.gz samba-3b11ee1db1bbe966900fc917e3358937d1b23d62.tar.bz2 samba-3b11ee1db1bbe966900fc917e3358937d1b23d62.zip |
s4:pyregistry: PyArg_ParseTuple("z#") requires an 'int' argument instead of 'size_t'
If we pass variables by reference we don't get implicit type casting.
metze
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/registry/pyregistry.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/lib/registry/pyregistry.c b/source4/lib/registry/pyregistry.c index 5719bbd115..a3317c73ba 100644 --- a/source4/lib/registry/pyregistry.c +++ b/source4/lib/registry/pyregistry.c @@ -212,11 +212,14 @@ static PyObject *py_hive_key_set_value(PyObject *self, PyObject *args) char *name; uint32_t type; DATA_BLOB value; + int value_length = 0; WERROR result; struct hive_key *key = PyHiveKey_AsHiveKey(self); - if (!PyArg_ParseTuple(args, "siz#", &name, &type, &value.data, &value.length)) + if (!PyArg_ParseTuple(args, "siz#", &name, &type, &value.data, &value_length)) { return NULL; + } + value.length = value_length; if (value.data != NULL) result = hive_key_set_value(key, name, type, value); |