]> git.cworth.org Git - apitrace/commitdiff
Fix assertion failure.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Tue, 31 Jan 2012 19:35:24 +0000 (19:35 +0000)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Wed, 1 Feb 2012 12:20:30 +0000 (12:20 +0000)
trace.py

index a9395339c2981b054a612fbbacdcd43c2adcf4ec..a9764ee384bfd3a9d86c3f42d909f363afafd18f 100644 (file)
--- 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();'