[SCM] Samba Shared Repository - branch v4-0-test updated -
release-4-0-0alpha3-1971-gdb6122e
Andrew Tridgell
tridge at samba.org
Fri May 30 06:19:40 GMT 2008
The branch, v4-0-test has been updated
via db6122ec104e80ee2e02b1170ff808b6456b780b (commit)
from 7598c8389745fcc77da341b4af2dcef6a01db700 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test
- Log -----------------------------------------------------------------
commit db6122ec104e80ee2e02b1170ff808b6456b780b
Author: Andrew Tridgell <tridge at samba.org>
Date: Fri May 30 16:19:22 2008 +1000
two more places where the wrong type is passed to PyArg_ParseTupleAndKeywords()
-----------------------------------------------------------------------
Summary of changes:
source/lib/messaging/pymessaging.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/messaging/pymessaging.c b/source/lib/messaging/pymessaging.c
index 869508f..41c9c82 100644
--- a/source/lib/messaging/pymessaging.c
+++ b/source/lib/messaging/pymessaging.c
@@ -162,11 +162,11 @@ static void py_msg_callback_wrapper(struct messaging_context *msg, void *private
static PyObject *py_messaging_register(PyObject *self, PyObject *args, PyObject *kwargs)
{
messaging_Object *iface = (messaging_Object *)self;
- uint32_t msg_type = -1;
+ int msg_type = -1;
PyObject *callback;
NTSTATUS status;
const char *kwnames[] = { "callback", "msg_type", NULL };
-
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i:send",
discard_const_p(char *, kwnames), &callback, &msg_type)) {
return NULL;
@@ -175,8 +175,10 @@ static PyObject *py_messaging_register(PyObject *self, PyObject *args, PyObject
Py_INCREF(callback);
if (msg_type == -1) {
+ uint32_t msg_type32 = msg_type;
status = messaging_register_tmp(iface->msg_ctx, callback,
- py_msg_callback_wrapper, &msg_type);
+ py_msg_callback_wrapper, &msg_type32);
+ msg_type = msg_type32;
} else {
status = messaging_register(iface->msg_ctx, callback,
msg_type, py_msg_callback_wrapper);
@@ -192,7 +194,7 @@ static PyObject *py_messaging_register(PyObject *self, PyObject *args, PyObject
static PyObject *py_messaging_deregister(PyObject *self, PyObject *args, PyObject *kwargs)
{
messaging_Object *iface = (messaging_Object *)self;
- uint32_t msg_type = -1;
+ int msg_type = -1;
PyObject *callback;
const char *kwnames[] = { "callback", "msg_type", NULL };
--
Samba Shared Repository
More information about the samba-cvs
mailing list