Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / libgo / runtime / array.h
blobf6d0261dff95d96beaafe4695438a83fe51a7d55
1 /* array.h -- the open array type for Go.
3 Copyright 2009 The Go Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file. */
7 #ifndef LIBGO_ARRAY_H
8 #define LIBGO_ARRAY_H
10 /* An open array is an instance of this structure. */
12 struct __go_open_array
14 /* The elements of the array. In use in the compiler this is a
15 pointer to the element type. */
16 void* __values;
17 /* The number of elements in the array. Note that this is "int",
18 not "size_t". The language definition says that "int" is large
19 enough to hold the size of any allocated object. Using "int"
20 saves 8 bytes per slice header on a 64-bit system with 32-bit
21 ints. */
22 int __count;
23 /* The capacity of the array--the number of elements that can fit in
24 the __VALUES field. */
25 int __capacity;
28 #endif /* !defined(LIBGO_ARRAY_H) */