(self, length, address)
Return a writeable view of a string from its string pointer.
Return a writeable view of a string from its string pointer.
Return a writeable view of a string from its string pointer .
def view(self, length, address):
        """Return a writeable view of a string from its string pointer."""
        # empty string pointers can point anywhere
        if length == 0:
            return memoryview(bytearray())
        if address >= self._memory.var_start():
            # string stored in string space
            return memoryview(self._retrieve(length, address))
        elif address >= self._memory.code_start:
            # get string stored in code as bytearray
            codestr = self._memory.program.get_memory_block(address, length)
            # NOTE this is a writeable view of a *copy* of the code!
            return memoryview(codestr)
        else:
            # string stored in field buffers
            return self._memory.view_field_memory(address, length)
def view ( self , length , address ) : # empty string pointers can point anywhere if length == 0 : return memoryview ( bytearray ( ) ) if address >= self . _memory . var_start ( ) : # string stored in string space return memoryview ( self . _retrieve ( length , address ) ) elif address >= self . _memory . code_start : # get string stored in code as bytearray codestr = self . _memory . program . get_memory_block ( address , length ) # NOTE this is a writeable view of a *copy* of the code! return memoryview ( codestr ) else : # string stored in field buffers return self . _memory . view_field_memory ( address , length )