From 4702feb5b1958eeef9b4414a2fb7cac259394a52 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 19 Jul 2010 16:27:42 +0200 Subject: Don't send CursorHeader if cursor_flags is NONE --- python_modules/demarshal.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python_modules/demarshal.py') diff --git a/python_modules/demarshal.py b/python_modules/demarshal.py index 4aba7b0..f259ead 100644 --- a/python_modules/demarshal.py +++ b/python_modules/demarshal.py @@ -708,7 +708,10 @@ def write_switch_parser(writer, container, switch, dest, scope): if switch.has_end_attr(): dest2 = dest.child_at_end(writer, m.member_type) elif switch.has_attr("anon"): - dest2 = dest + if t.is_struct() and not m.has_attr("to_ptr"): + dest2 = dest.child_sub(m.name) + else: + dest2 = dest else: if t.is_struct(): dest2 = dest.child_sub(switch.name + "." + m.name) -- cgit