Fixed multiple indirection on Pointers / Arrays
authorRyan Jendoubi <ryan.jendoubi@gmail.com>
Wed, 11 Aug 2010 02:41:40 +0000 (03:41 +0100)
committerRyan Jendoubi <ryan.jendoubi@gmail.com>
Wed, 11 Aug 2010 02:47:00 +0000 (03:47 +0100)
commitf7ddc76c84dfa81889d76f3ebd3ce923662b566a
tree628b7fdd781b51ccbfdad6f1778b01e3fefe15ad
parentb6c493bee0e2c106bf1cab1c19a5878788e36f5e
Fixed multiple indirection on Pointers / Arrays

At the minute, the object that was finally passed must either be
explicitly ->_update_'d, or must be the first used after the
call returns (in which case it updates itself automatically).

This should be made automatic using paramflags.

Alternatively, _as_param_ could take an argument of a reference
to the requesting object, or the place the data will be stored and
worked upon. Then data could be 'chased up' the object chain to
ensure freshness.
Interface should probably be through _update_, with objects free
to use their own internal mechanism to know whether their own
data is fresh (i.e. has it been stored again since it was given
out?).

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
lib/Ctypes/Type.pm
lib/Ctypes/Type/Array.pm
lib/Ctypes/Type/Pointer.pm
t/Array.t
t/Pointer.t