From 3d2b0650a11a22802b52d332e3d131dadd984cca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Tue, 31 Jan 2012 19:35:24 +0000 Subject: [PATCH] Fix assertion failure. --- trace.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/trace.py b/trace.py index a939533..a9764ee 100644 --- a/trace.py +++ b/trace.py @@ -496,7 +496,7 @@ class Tracer: print ' trace::localWriter.endArg();' from specs.winapi import REFIID - from specs.stdapi import Pointer, Opaque + from specs.stdapi import Pointer, Opaque, Interface riid = None for arg in method.args: @@ -515,8 +515,11 @@ class Tracer: self.serializeArg(method, arg) self.wrapArg(method, arg) if riid is not None and isinstance(arg.type, Pointer): - assert isinstance(arg.type.type, Opaque) - self.wrapIid(interface, method, riid, arg) + if isinstance(arg.type.type, Opaque): + self.wrapIid(riid, arg) + else: + assert isinstance(arg.type.type, Pointer) + assert isinstance(arg.type.type.type, Interface) if method.type is not stdapi.Void: print ' trace::localWriter.beginReturn();' -- 2.45.2