'Define a byte at ad. If there is no xref to ad, the byte is
deleted from memory.
returns True if ok'

def set_byte(self, ad):

    ad2 = self.mem.get_head_addr(ad)
    if (not self.__undefine(ad2)):
        return False
    if (ad in self.__db.xrefs):
        self.mem.add(ad, 1, MEM_BYTE)
    else:
        self.mem.rm_range(ad, max(self.mem.get_size(ad), 1))
    return True
