This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: void* vector


The documentation in vec.h says that pointer values are dereferenced:

Both the structure object and pointer variants
pass pointers to objects around -- in the former case the pointers
are stored into the vector and in the latter case the pointers are
dereferenced and the objects copied into the vector.

It is impossible to dereference a void*. Therefore, we need to use either VEC_I or structure object, but the latter is a stretch.

On 12/9/06, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
On 12/9/06, Alexey Smirnov <alexey@gmail.com> wrote:
> typedef void* handle_t;
>
> DEF_VEC_I(handle_t);
> DEF_VEC_ALLOC_I(handle_t,heap);

Why DEF_VEC_I instead of DEF_VEC_P?

See vec.h.

Gr.
Steven



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]