2014-07-11 Edward Smith-Rowland <3dw4rd@verizon.net>
[official-gcc.git] / libgo / runtime / array.h
blob14a9bb48ff0ae68e92ac069f4decc4220e81f8c9
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 intgo __count;
23 /* The capacity of the array--the number of elements that can fit in
24 the __VALUES field. */
25 intgo __capacity;
28 #endif /* !defined(LIBGO_ARRAY_H) */