diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-01-21 18:38:40 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-01-21 18:38:40 +0100 |
commit | 293acaf92e7234665e15c3fb7fd600427ffcd5ce (patch) | |
tree | f4cf7527ea70b4a311d2f71ebd20830dfc3c92b0 | |
parent | 076bb89028ea4d27a96492b2030d873b0d78ca24 (diff) | |
download | samba-293acaf92e7234665e15c3fb7fd600427ffcd5ce.tar.gz samba-293acaf92e7234665e15c3fb7fd600427ffcd5ce.tar.bz2 samba-293acaf92e7234665e15c3fb7fd600427ffcd5ce.zip |
pidl/python: Add explicit casts, fixes warnings about casts when enabled.
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/Python.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 6d25fcd24f..3efe77bdd9 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -195,7 +195,7 @@ sub PythonStruct($$$$$$) $self->pidl("static PyObject *py_$name\_get_$e->{NAME}(PyObject *obj, void *closure)"); $self->pidl("{"); $self->indent; - $self->pidl("$cname *object = py_talloc_get_ptr(obj);"); + $self->pidl("$cname *object = ($cname *)py_talloc_get_ptr(obj);"); $self->pidl("PyObject *py_$e->{NAME};"); $self->ConvertObjectToPython("py_talloc_get_mem_ctx(obj)", $env, $e, $varname, "py_$e->{NAME}", "return NULL;"); $self->pidl("return py_$e->{NAME};"); @@ -206,7 +206,7 @@ sub PythonStruct($$$$$$) $self->pidl("static int py_$name\_set_$e->{NAME}(PyObject *py_obj, PyObject *value, void *closure)"); $self->pidl("{"); $self->indent; - $self->pidl("$cname *object = py_talloc_get_ptr(py_obj);"); + $self->pidl("$cname *object = ($cname *)py_talloc_get_ptr(py_obj);"); my $mem_ctx = "py_talloc_get_mem_ctx(py_obj)"; my $l = $e->{LEVELS}[0]; my $nl = GetNextLevel($e, $l); @@ -250,7 +250,7 @@ sub PythonStruct($$$$$$) $self->pidl("static PyObject *py_$name\_ndr_pack(PyObject *py_obj)"); $self->pidl("{"); $self->indent; - $self->pidl("$cname *object = py_talloc_get_ptr(py_obj);"); + $self->pidl("$cname *object = ($cname *)py_talloc_get_ptr(py_obj);"); $self->pidl("DATA_BLOB blob;"); $self->pidl("enum ndr_err_code err;"); $self->pidl("err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), NULL, object, (ndr_push_flags_fn_t)ndr_push_$name);"); @@ -269,7 +269,7 @@ sub PythonStruct($$$$$$) $self->pidl("static PyObject *py_$name\_ndr_unpack(PyObject *py_obj, PyObject *args)"); $self->pidl("{"); $self->indent; - $self->pidl("$cname *object = py_talloc_get_ptr(py_obj);"); + $self->pidl("$cname *object = ($cname *)py_talloc_get_ptr(py_obj);"); $self->pidl("DATA_BLOB blob;"); $self->pidl("enum ndr_err_code err;"); $self->pidl("if (!PyArg_ParseTuple(args, \"s#:__ndr_unpack__\", &blob.data, &blob.length))"); |