From: José Fonseca Date: Tue, 31 Jan 2012 19:35:24 +0000 (+0000) Subject: Fix assertion failure. X-Git-Tag: 2.0_alpha^2~321 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d2b0650a11a22802b52d332e3d131dadd984cca;p=tools%2Fapitrace.git Fix assertion failure. --- 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();'