瀏覽代碼

*** empty log message ***

David Rose 24 年之前
父節點
當前提交
f73752ceb9
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      direct/src/ffi/FFIExternalObject.py

+ 3 - 3
direct/src/ffi/FFIExternalObject.py

@@ -75,13 +75,13 @@ class FFIExternalObject:
 
 
         # Walk along the lineage looking for downcast functions from class to class+1
         # Walk along the lineage looking for downcast functions from class to class+1
         for i in range((len(lineage) - 1)):
         for i in range((len(lineage) - 1)):
-            fromClass = lineage[i]
-            toClass = lineage[i+1]
+            toClass = lineage[i]
+            fromClass = lineage[i+1]
             downcastFuncName = ('downcastTo' + toClass.__name__
             downcastFuncName = ('downcastTo' + toClass.__name__
                                 + 'From' + fromClass.__name__)
                                 + 'From' + fromClass.__name__)
             # Look over this classes global modules dictionaries
             # Look over this classes global modules dictionaries
             # for the downcast function name
             # for the downcast function name
-            for globmod in fromClass.__CModuleDowncasts__:
+            for globmod in toClass.__CModuleDowncasts__:
                 if globmod.__dict__.has_key(downcastFuncName):
                 if globmod.__dict__.has_key(downcastFuncName):
                     func = globmod.__dict__[downcastFuncName]
                     func = globmod.__dict__[downcastFuncName]
                     FFIConstants.notify.debug(
                     FFIConstants.notify.debug(