]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
pidl: Do not call mapTypeName() on expression
authorJo Sutton <josutton@catalyst.net.nz>
Tue, 13 Feb 2024 00:17:28 +0000 (13:17 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 16 Feb 2024 02:41:36 +0000 (02:41 +0000)
$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 <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
pidl/lib/Parse/Pidl/Samba4/Python.pm

index c09ee4b784d45f0273c13ae8209037818ea2d820..65cad3ee221ab4385f54f231ff29ca94549c7c10 100644 (file)
@@ -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("}");