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

Side by Side Diff: gdb/common/vec.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 | « gdb/common/signals.c ('k') | gdb/common/vec.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Vector API for GDB. 1 /* Vector API for GDB.
2 Copyright (C) 2004-2012 Free Software Foundation, Inc. 2 Copyright (C) 2004-2012 Free Software Foundation, Inc.
3 Contributed by Nathan Sidwell <nathan@codesourcery.com> 3 Contributed by Nathan Sidwell <nathan@codesourcery.com>
4 4
5 This file is part of GDB. 5 This file is part of GDB.
6 6
7 This program is free software; you can redistribute it and/or modify 7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or 9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version. 10 (at your option) any later version.
11 11
12 This program is distributed in the hope that it will be useful, 12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details. 15 GNU General Public License for more details.
16 16
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 19
20 #if !defined (GDB_VEC_H) 20 #if !defined (GDB_VEC_H)
21 #define GDB_VEC_H 21 #define GDB_VEC_H
22 22
23 #include <stddef.h> 23 #include <stddef.h>
24
25 #ifndef GDBSERVER
24 #include "gdb_string.h" 26 #include "gdb_string.h"
25 #include "gdb_assert.h" 27 #include "gdb_assert.h"
28 #endif
26 29
27 /* The macros here implement a set of templated vector types and 30 /* The macros here implement a set of templated vector types and
28 associated interfaces. These templates are implemented with 31 associated interfaces. These templates are implemented with
29 macros, as we're not in C++ land. The interface functions are 32 macros, as we're not in C++ land. The interface functions are
30 typesafe and use static inline functions, sometimes backed by 33 typesafe and use static inline functions, sometimes backed by
31 out-of-line generic functions. 34 out-of-line generic functions.
32 35
33 Because of the different behavior of structure objects, scalar 36 Because of the different behavior of structure objects, scalar
34 objects and of pointers, there are three flavors, one for each of 37 objects and of pointers, there are three flavors, one for each of
35 these variants. Both the structure object and pointer variants 38 these variants. Both the structure object and pointer variants
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 \ 1027 \
1025 static inline T *VEC_OP (T,safe_insert) \ 1028 static inline T *VEC_OP (T,safe_insert) \
1026 (VEC(T) **vec_, unsigned ix_, const T *obj_ VEC_ASSERT_DECL) \ 1029 (VEC(T) **vec_, unsigned ix_, const T *obj_ VEC_ASSERT_DECL) \
1027 { \ 1030 { \
1028 VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); \ 1031 VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); \
1029 \ 1032 \
1030 return VEC_OP (T,quick_insert) (*vec_, ix_, obj_ VEC_ASSERT_PASS); \ 1033 return VEC_OP (T,quick_insert) (*vec_, ix_, obj_ VEC_ASSERT_PASS); \
1031 } 1034 }
1032 1035
1033 #endif /* GDB_VEC_H */ 1036 #endif /* GDB_VEC_H */
OLDNEW
« no previous file with comments | « gdb/common/signals.c ('k') | gdb/common/vec.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698