src/core/c/pandalib.c
// Creates a new Panda Array object. All cells of the array will be zeroed.
// class_ptr - the specific Array class object
// length - the initial length of the array
// elementSize - the size of each element
// elementsArePointers - true if the array elements are pointers (if not,
//         the garbage collector doesn't need to worry about them)
Creates a new Panda Array object. All cells of the array will be zeroed.
class_ptr - the specific Array class object
length - the initial length of the array
elementSize - the size of each element
elementsArePointers - true if the array elements are pointers (if not,
the garbage collector doesn't need to worry about them)
Creates a new Panda Array object . All cells of the array will be zeroed . class_ptr - the specific Array class object length - the initial length of the array elementSize - the size of each element elementsArePointers - true if the array elements are pointers ( if not the garbage collector doesn ' t need to worry about them )
PrimitiveArray* pandaNewPrimitiveArrayWithLength(Class* class_ptr, Int length, 
        Int elementSize, Bit elementsArePointers) {
    if ((elementSize < 0) || (length < 0))
       pandaFatalError("creating array with negative size");
    PrimitiveArray* result = (PrimitiveArray*) _pandaNew(class_ptr, 
            sizeof(PrimitiveArray));
    result->length = length;
    result->contents = pandaAlloc(length * elementSize, elementsArePointers);
    return result;
}
PrimitiveArray * pandaNewPrimitiveArrayWithLength ( Class * class_ptr , Int length , Int elementSize , Bit elementsArePointers ) { if ( ( elementSize < 0 ) || ( length < 0 ) ) pandaFatalError ( " " ) ; PrimitiveArray * result = ( PrimitiveArray * ) _pandaNew ( class_ptr , sizeof ( PrimitiveArray ) ) ; result -> length = length ; result -> contents = pandaAlloc ( length * elementSize , elementsArePointers ) ; return result ; }
Creates a new Panda Array object.
Creates a new Panda Array object .