[python-bindings] Fixed 3 test failures caused by typos.
[oota-llvm.git] / bindings / python / llvm / core.py
index f7f3748d4c3d477d8a6e35fab30308efe5e97dc0..19b4bbec256752d60d3965a162cc53454609b626 100644 (file)
@@ -125,8 +125,9 @@ class Module(LLVMObject):
 
     def print_module_to_file(self, filename):
         out = c_char_p(None)
-        result = lib.LLVMPrintModuleToFile(self, filename, byref(out))
-        if not result:
+        # Result is inverted so 0 means everything was ok.
+        result = lib.LLVMPrintModuleToFile(self, filename, byref(out))        
+        if result:
             raise RuntimeError("LLVM Error: %s" % out.value)
 
 class Context(LLVMObject):