git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2868fc8
)
pidl:Samba4/Python: fix segfault when setting pointers to scalars.
author
Stefan Metzmacher
<metze@samba.org>
Wed, 5 Jan 2011 09:05:47 +0000
(10:05 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Wed, 5 Jan 2011 09:24:49 +0000
(10:24 +0100)
metze
pidl/lib/Parse/Pidl/Samba4/Python.pm
patch
|
blob
|
history
diff --git
a/pidl/lib/Parse/Pidl/Samba4/Python.pm
b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 60352ae8d7f51b5578308c48a6026497c8338c0a..fa18056882cfcf41588d2681cf82c80ff614796d 100644
(file)
--- a/
pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/
pidl/lib/Parse/Pidl/Samba4/Python.pm
@@
-1000,6
+1000,9
@@
sub ConvertObjectFromPythonLevel($$$$$$$$)
# then this is where we would need to allocate it
if ($l->{POINTER_TYPE} eq "ref") {
$self->pidl("$var_name = talloc_ptrtype($mem_ctx, $var_name);");
+ } elsif ($nl->{TYPE} eq "DATA" and Parse::Pidl::Typelist::is_scalar($nl->{DATA_TYPE})
+ and not Parse::Pidl::Typelist::scalar_is_reference($nl->{DATA_TYPE})) {
+ $self->pidl("$var_name = talloc_ptrtype($mem_ctx, $var_name);");
} else {
$self->pidl("$var_name = NULL;");
}