diff options
author | Stefan Metzmacher <metze@samba.org> | 2015-06-11 09:58:13 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2015-06-12 17:08:19 +0200 |
commit | ad7148fec650c10fa77daf73ece57a8dfa37eb63 (patch) | |
tree | ebc7bd9d189f3fd2d01c792f2d20664b351e27f0 /pidl | |
parent | 3d7ce9d411d720c975f868386498da3db4f07d53 (diff) | |
download | samba-ad7148fec650c10fa77daf73ece57a8dfa37eb63.tar.gz |
pidl:Python: use discard_const() to pass a possible const pointer to talloc_unlink()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'pidl')
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/Python.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index b634137cd5d..1d271bfa525 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -224,7 +224,7 @@ sub PythonStruct($$$$$$) if ($l->{TYPE} eq "POINTER" and not ($nl->{TYPE} eq "ARRAY" and ($nl->{IS_FIXED} or is_charset_array($e, $nl))) and not ($nl->{TYPE} eq "DATA" and Parse::Pidl::Typelist::scalar_is_reference($nl->{DATA_TYPE}))) { - $self->pidl("talloc_unlink(pytalloc_get_mem_ctx(py_obj), $varname);"); + $self->pidl("talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const($varname));"); } $self->ConvertObjectFromPython($env, $mem_ctx, $e, "value", $varname, "return -1;"); $self->pidl("return 0;"); |