Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(452)

Side by Side Diff: include/splay-tree.h

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/plugin-api.h ('k') | include/vms/ChangeLog » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* A splay-tree datatype. 1 /* A splay-tree datatype.
2 Copyright 1998, 1999, 2000, 2002, 2005, 2007, 2009, 2010 2 Copyright 1998, 1999, 2000, 2002, 2005, 2007, 2009, 2010
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 Contributed by Mark Mitchell (mark@markmitchell.com). 4 Contributed by Mark Mitchell (mark@markmitchell.com).
5 5
6 This file is part of GCC. 6 This file is part of GCC.
7 7
8 GCC is free software; you can redistribute it and/or modify it 8 GCC is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by 9 under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option) 10 the Free Software Foundation; either version 2, or (at your option)
(...skipping 19 matching lines...) Expand all
30 30
31 #ifndef _SPLAY_TREE_H 31 #ifndef _SPLAY_TREE_H
32 #define _SPLAY_TREE_H 32 #define _SPLAY_TREE_H
33 33
34 #ifdef __cplusplus 34 #ifdef __cplusplus
35 extern "C" { 35 extern "C" {
36 #endif /* __cplusplus */ 36 #endif /* __cplusplus */
37 37
38 #include "ansidecl.h" 38 #include "ansidecl.h"
39 39
40 #ifndef _WIN64 40 #ifdef HAVE_STDINT_H
41 typedef unsigned long int libi_uhostptr_t; 41 #include <stdint.h>
42 typedef long int libi_shostptr_t;
43 #else
44 #ifdef __GNUC__
45 __extension__
46 #endif 42 #endif
47 typedef unsigned long long libi_uhostptr_t; 43 #ifdef HAVE_INTTYPES_H
48 #ifdef __GNUC__ 44 #include <inttypes.h>
49 __extension__
50 #endif
51 typedef long long libi_shostptr_t;
52 #endif 45 #endif
53 46
54 #ifndef GTY 47 #ifndef GTY
55 #define GTY(X) 48 #define GTY(X)
56 #endif 49 #endif
57 50
58 /* Use typedefs for the key and data types to facilitate changing 51 /* Use typedefs for the key and data types to facilitate changing
59 these types, if necessary. These types should be sufficiently wide 52 these types, if necessary. These types should be sufficiently wide
60 that any pointer or scalar can be cast to these types, and then 53 that any pointer or scalar can be cast to these types, and then
61 cast back, without loss of precision. */ 54 cast back, without loss of precision. */
62 typedef libi_uhostptr_t splay_tree_key; 55 typedef uintptr_t splay_tree_key;
63 typedef libi_uhostptr_t splay_tree_value; 56 typedef uintptr_t splay_tree_value;
64 57
65 /* Forward declaration for a node in the tree. */ 58 /* Forward declaration for a node in the tree. */
66 typedef struct splay_tree_node_s *splay_tree_node; 59 typedef struct splay_tree_node_s *splay_tree_node;
67 60
68 /* The type of a function which compares two splay-tree keys. The 61 /* The type of a function which compares two splay-tree keys. The
69 function should return values as for qsort. */ 62 function should return values as for qsort. */
70 typedef int (*splay_tree_compare_fn) (splay_tree_key, splay_tree_key); 63 typedef int (*splay_tree_compare_fn) (splay_tree_key, splay_tree_key);
71 64
72 /* The type of a function used to deallocate any resources associated 65 /* The type of a function used to deallocate any resources associated
73 with the key. */ 66 with the key. */
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 extern splay_tree_node splay_tree_min (splay_tree); 152 extern splay_tree_node splay_tree_min (splay_tree);
160 extern int splay_tree_foreach (splay_tree, splay_tree_foreach_fn, void*); 153 extern int splay_tree_foreach (splay_tree, splay_tree_foreach_fn, void*);
161 extern int splay_tree_compare_ints (splay_tree_key, splay_tree_key); 154 extern int splay_tree_compare_ints (splay_tree_key, splay_tree_key);
162 extern int splay_tree_compare_pointers (splay_tree_key, splay_tree_key); 155 extern int splay_tree_compare_pointers (splay_tree_key, splay_tree_key);
163 156
164 #ifdef __cplusplus 157 #ifdef __cplusplus
165 } 158 }
166 #endif /* __cplusplus */ 159 #endif /* __cplusplus */
167 160
168 #endif /* _SPLAY_TREE_H */ 161 #endif /* _SPLAY_TREE_H */
OLDNEW
« no previous file with comments | « include/plugin-api.h ('k') | include/vms/ChangeLog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698