4
/* Body of a CArray. */
6
/* The storage of C-land elements. */
9
/* The storage of Perl-land elements */
12
/* Are we managing the memory for this array ourselves, or does it come
16
/* The number of elements we've allocated. If we do not know,
17
* because the array was returned to us from elsewhere and we
18
* are not managing it's memory, this is 0. */
21
/* The number of elements we have, if known. Invalid if we
22
* are not managing the array. */
26
/* This is how an instance with the CArray representation looks. */
28
SixModelObjectCommonalities common;
32
/* What kind of element do we have? */
33
#define CARRAY_ELEM_KIND_NUMERIC 1
34
#define CARRAY_ELEM_KIND_STRING 2
35
#define CARRAY_ELEM_KIND_CPOINTER 3
36
#define CARRAY_ELEM_KIND_CARRAY 4
37
#define CARRAY_ELEM_KIND_CSTRUCT 5
39
/* The CArray REPR data contains a little info about the type of array
42
/* The number of bytes in size that an element is. */
45
/* The type of an element. */
48
/* What kind of element is it (lets us quickly know how to handle access
53
/* Initializes the CArray REPR. */
54
REPROps * CArray_initialize(PARROT_INTERP,
55
PMC * (* wrap_object_func_ptr) (PARROT_INTERP, void *obj),
56
PMC * (* create_stable_func_ptr) (PARROT_INTERP, REPROps *REPR, PMC *HOW));