diff options
author | Sven Gothel <[email protected]> | 2011-04-27 19:47:43 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-04-27 19:47:43 +0200 |
commit | 8f8aa3f73e3c9804c4a86f5d4fdac257d50d831a (patch) | |
tree | 87497a9ffd60f4d3c2be2535312a72f84087a23d /doc/manual/example1 | |
parent | a07892f07f15c96ca248fc12133748be7058241f (diff) |
NativeBuffer/PointerBuffer API/Impl Change (remove explicit backup array, alloc referenced data map if used only)
This patch doesn't impact GlueGen's code generation,
but enhance and fix PointerBuffer usage only.
remove explicit backup array
As suggested by Michael Bien with a proposed patch,
PointerBuffer's backup array is not only redundant in case it's not used,
but also erroneous - due to possible sliced buffers.
Removes the explicit backup array implementation
leaving it up to the user, ie how PointerBuffer is created (alloc/allocDirect)
and use the underlying nio's buffer backup array, if available.
This also fixes the (never tested) case of indirect w/ backup array usage
on 32bit platform size. In this case the array shall be of type int[],
holding 32bit pointer - on 64bit long[].
Previous to this patch, it was always long[].
Added more thorough tests of PointerBuffer, notably indirect w/ backup array
and native deep copy and filling of a pointer array.
alloc referenced data map if used only
As suggested by Michael Bien with a proposed patch,
the allocation of the dataMap hash map is redundant in case it's not used.
The hash map will be initialized lazy, if needed only.
Diffstat (limited to 'doc/manual/example1')
0 files changed, 0 insertions, 0 deletions