Completed update of data ownership chaining
Today's work was important for moving on to Structs.
The main principle was the same as used in the Python version, of
objects having an _owner attribute set when they become part of a
bigger data structure, like an Array or Struct. When an object
becomes owned by another, the owner will set two attributes in
the owned object:
1) {_owner}, set to the owner object (is undef on instantiation,
although most tests on it check for truth rather than definedness)
2) {_index}, set to the offset of the owned object's data inside
the owner object's data, *in bytes*. It is Not an array or
pseudohash index. It is used in substr operations, so that owned
objects can check in the owner's data if their data has been
modified, instead of owners having to repopulate Every owned
object with data when it is updated (although this is sometimes
necessary, when an owner's data is updated without an index
indicating what has changed).
modified: lib/Ctypes.pm
modified: lib/Ctypes/Type.pm
modified: lib/Ctypes/Type/Array.pm
modified: lib/Ctypes/Type/Pointer.pm
modified: t/Array.t
modified: t/Pointer.t
new file: t/Struct.t