git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
100565b
)
s4:pyregistry: PyArg_ParseTuple("z#") requires an 'int' argument instead of 'size_t'
author
Stefan Metzmacher
<metze@samba.org>
Mon, 8 Aug 2011 12:30:00 +0000
(14:30 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Mon, 8 Aug 2011 14:45:27 +0000
(16:45 +0200)
If we pass variables by reference we don't get implicit type casting.
metze
source4/lib/registry/pyregistry.c
patch
|
blob
|
history
diff --git
a/source4/lib/registry/pyregistry.c
b/source4/lib/registry/pyregistry.c
index 5719bbd11516b53882f90b9dadcc267e82538a1f..a3317c73badf89bb8cd528791a409e9d09b32158 100644
(file)
--- 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);