OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgo/] [runtime/] [array.h] - Blame information for rev 747

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 747 jeremybenn
/* array.h -- the open array type for Go.
2
 
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.  */
6
 
7
#ifndef LIBGO_ARRAY_H
8
#define LIBGO_ARRAY_H
9
 
10
/* An open array is an instance of this structure.  */
11
 
12
struct __go_open_array
13
{
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;
26
};
27
 
28
#endif /* !defined(LIBGO_ARRAY_H) */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.