Post by DarkPikachu on Mar 31, 2014 11:05:38 GMT -5
Home | Prev | Next
These powerful functions operate on file data in a very similar fashion to how pointers in C operate on RAM data.
each file you import has it's own memory space in UMC, where specific data types and structures defined by UMC take their place to return the address of the data you're performing the operation on.
because this management doesn't work on RAM, it's not possible to get the pointer of a pointer like you can in C.
you can only get the pointers from data structures that operate on the current file.
usage:
something else being considered is the ability to only reference lists, tuples, and dicts.
due to them being Python-defined data types, you won't be able to set anything contained in them w/o a manual interface of your own.
(a fix for this is being planned, but will most likely require a separate function to do the dirty work)
^ I'm also not promising the incompatibilities won't cause a slow-down.
These powerful functions operate on file data in a very similar fashion to how pointers in C operate on RAM data.
each file you import has it's own memory space in UMC, where specific data types and structures defined by UMC take their place to return the address of the data you're performing the operation on.
because this management doesn't work on RAM, it's not possible to get the pointer of a pointer like you can in C.
you can only get the pointers from data structures that operate on the current file.
usage:
addresses = ref( struct, ... )
deref( addr, struct )
def SyntaxHighlightFix(): #ignore this line
data = bu32()
data2 = bu32()
# get the reference addresses to these datas just like in C
address, address2 = ref( data, data2 ) # ( &data, &data2 )
indirect = deref( address, bu32 ) # just like the dereference operator in C
indirect.set( 40 ) # this will also update the value of data.
# NOTE: like C, only the value changes,
# the actual data type remains the same if you deref another data type.
def SyntaxHighlightFix(): #ignore this line
something else being considered is the ability to only reference lists, tuples, and dicts.
due to them being Python-defined data types, you won't be able to set anything contained in them w/o a manual interface of your own.
(a fix for this is being planned, but will most likely require a separate function to do the dirty work)
^ I'm also not promising the incompatibilities won't cause a slow-down.