Use integer division in Python 3
authorMartin Panter <vadmium à gmail·com>
Thu, 13 Feb 2014 10:53:56 +0000 (10:53 +0000)
committerMartin Panter <vadmium à gmail·com>
Thu, 1 May 2014 12:02:09 +0000 (12:02 +0000)
This means DwarfConfig.default_address_size is now an integer in Python 3, as
in Python 2.

elftools/elf/elffile.py

index ed168ccff83ca4434ae197cd4476998199a0ac67..101c727e77efb4ede4200aa524690ee7730b9f06 100644 (file)
@@ -141,7 +141,7 @@ class ELFFile(object):
         return DWARFInfo(
                 config=DwarfConfig(
                     little_endian=self.little_endian,
-                    default_address_size=self.elfclass / 8,
+                    default_address_size=self.elfclass // 8,
                     machine_arch=self.get_machine_arch()),
                 debug_info_sec=debug_sections[b'.debug_info'],
                 debug_abbrev_sec=debug_sections[b'.debug_abbrev'],