so basically... I have a dynamic memory sub-system that does this:
d = bu32() # a value from dynamic memory (such as 2)
print d
print type(d)
p = ref(d) # a pointer
deref( p, bu16 ).set(10) # short *p = &d; *p = 10; //(not sure if correct)
print d
print type(d)
expected results:
2
<class '__main__.bu(4)'>
10
<class '__main__.bu(2)'>
actual results:
2
<class '__main__.bu(4)'>
2
<class '__main__.bu(4)'>
the problem:
>>> d2 = deref( p, bu16 )
>>> d2
0 #0x0000 0002 #ignored
>>> type(d2)
<class '__main__.bu(2)'>
>>> d2.set(10) #0x000A 0002
it doesn't update the instance of d, so d is still a bu32 value of 2
how could I pull this off??