From: Jo Sutton Date: Tue, 13 Feb 2024 00:17:28 +0000 (+1300) Subject: pidl: Do not call mapTypeName() on expression X-Git-Tag: tdb-1.4.11~1715 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2a3c186c365f0e864dfe6734fcec0bf14bc4f3f;p=thirdparty%2Fsamba.git pidl: Do not call mapTypeName() on expression $var_name is not a type name, but an expression, such as ‘r->in.server’. mapTypeName() will turn this into ‘struct r->in.server’, which makes no sense. Signed-off-by: Jo Sutton Reviewed-by: Andrew Bartlett --- diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index c09ee4b784d..65cad3ee221 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -1925,8 +1925,7 @@ sub ConvertObjectFromPythonLevel($$$$$$$$$) if ($recurse == 0) { $self->pidl("if ($py_var == NULL) {"); $self->indent; - $self->pidl("PyErr_Format(PyExc_AttributeError, \"Cannot delete NDR object: " . - mapTypeName($var_name) . "\");"); + $self->pidl("PyErr_Format(PyExc_AttributeError, \"Cannot delete NDR object: $var_name\");"); $self->pidl($fail); $self->deindent; $self->pidl("}");