Browse Source

This now work with an otp2 build.. good for py item leaks..

Roger Hughston 20 years ago
parent
commit
5ead01d7e5
1 changed files with 13 additions and 1 deletions
  1. 13 1
      direct/src/ffi/genPyCode.pp

+ 13 - 1
direct/src/ffi/genPyCode.pp

@@ -182,7 +182,19 @@ for package in packages:
                         isModule = 1
                         isModule = 1
                     except:
                     except:
                         isModule = 0
                         isModule = 0
-
+                        
+                    # 
+                    # RHH.... hack OPT2 .. py debug libraries...
+                    #
+                    if not isModule:
+                        # debug py library magin naming in windows..
+                        basename = basename.replace('_d','')                   
+                        try:
+                            __import__(basename, globals(), locals())
+                            isModule = 1
+                        except:
+                            isModule = 0                        
+                        
                     if isModule:
                     if isModule:
                         if basename not in DoGenPyCode.codeLibs:
                         if basename not in DoGenPyCode.codeLibs:
                             DoGenPyCode.codeLibs.append(basename)
                             DoGenPyCode.codeLibs.append(basename)