logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

array_get - get pointer to nth element in array

Description

       array_get  is  similar  to  array_allocate,  but  it  does  not allocate any extra bytes, and it does not
       initialize any extra bytes.   It  returns  0  if  x  is  unallocated,  for  example,  or  if  fewer  than
       (pos+1)*sizeof(t) bytes are initialized.

Name

       array_get - get pointer to nth element in array

See Also

array_allocate(3), array_fail(3), array_start(3)

                                                                                                    array_get(3)

Syntax

#include<libowfat/array.h>

       void* array_get(array* x, uint64 membersize, int64 pos);

         array x;
         int64 pos;
         t* p = array_get(&x,sizeof(t),pos);

See Also