Пример #1
0
 def dump(self, text):
     if not self.verbose:
         return
     _prev = Box._extended_display
     try:
         Box._extended_display = False
         print >> sys.stderr, ' 0x%x  %s' % (fixid(self.mc.tell()), text)
     finally:
         Box._extended_display = _prev
Пример #2
0
 def dump(self, text):
     if not self.verbose:
         return
     _prev = Box._extended_display
     try:
         Box._extended_display = False
         print >> sys.stderr, " 0x%x  %s" % (fixid(self.mc.tell()), text)
     finally:
         Box._extended_display = _prev
Пример #3
0
 def __repr__(self):
     if self._storage is None:
         return '<freed C object %s>' % (self._TYPE,)
     else:
         return '<C object %s at 0x%x>' % (self._TYPE,
                                           fixid(self._addressof_storage()))
Пример #4
0
def uaddressof(obj):
    return fixid(ctypes.addressof(obj))