Pointer objects
authorRyan Jendoubi <ryan.jendoubi@gmail.com>
Tue, 10 Aug 2010 22:06:36 +0000 (23:06 +0100)
committerRyan Jendoubi <ryan.jendoubi@gmail.com>
Tue, 10 Aug 2010 22:06:36 +0000 (23:06 +0100)
commitb6c493bee0e2c106bf1cab1c19a5878788e36f5e
tree6d2dca9bb6d5ae95e7cecfde86ff0f938be7b264
parent774bbef2976cb993fb2154d8df3698019814b262
Pointer objects

See t/Pointers.t for usage.

In general, '$ptr' for methods on the object and '$$ptr' for using
the pointer behaviour, e.g.

$$ptr[0] = 5;

The notable exception is that pointer arithmetic is done to the
object:

$ptr++;
$ptr->offset(6);

If you do $$ptr++ Ctypes attempts to construct a new pointer to
the numeric representation of the address of the object (I think);
there's a decent error message for this.

modified:   MANIFEST
modified:   lib/Ctypes.pm
modified:   lib/Ctypes/Type.pm
modified:   lib/Ctypes/Type/Array.pm
new file:   lib/Ctypes/Type/Pointer.pm
modified:   t/Array.t
new file:   t/Pointer.t
MANIFEST
lib/Ctypes.pm
lib/Ctypes/Type.pm
lib/Ctypes/Type/Array.pm
lib/Ctypes/Type/Pointer.pm [new file with mode: 0644]
t/Array.t
t/Pointer.t [new file with mode: 0644]