vec.h: Add casts for C++ compat
[deliverable/binutils-gdb.git] / gdb / common / vec.h
index 7bae2ff9494f1c669b669ab1d2eab1f603f34a8f..25644857abefee039fd3e8ed649e6998aca9b79e 100644 (file)
@@ -1,5 +1,5 @@
 /* Vector API for GDB.
-   Copyright (C) 2004-2014 Free Software Foundation, Inc.
+   Copyright (C) 2004-2015 Free Software Foundation, Inc.
    Contributed by Nathan Sidwell <nathan@codesourcery.com>
 
    This file is part of GDB.
 #if !defined (GDB_VEC_H)
 #define GDB_VEC_H
 
-#include <stddef.h>
-
-#include <string.h>
-#include "gdb_assert.h"
-
 /* The macros here implement a set of templated vector types and
    associated interfaces.  These templates are implemented with
    macros, as we're not in C++ land.  The interface functions are
@@ -501,7 +496,7 @@ static inline void VEC_OP (T,free)                                    \
 static inline void VEC_OP (T,cleanup)                                    \
      (void *arg_)                                                        \
 {                                                                        \
-  VEC(T) **vec_ = arg_;                                                          \
+  VEC(T) **vec_ = (VEC(T) **) arg_;                                      \
   if (*vec_)                                                             \
     vec_free_ (*vec_);                                                   \
   *vec_ = NULL;                                                                  \
@@ -748,7 +743,7 @@ static inline void VEC_OP (T,free)                                    \
 static inline void VEC_OP (T,cleanup)                                    \
      (void *arg_)                                                        \
 {                                                                        \
-  VEC(T) **vec_ = arg_;                                                          \
+  VEC(T) **vec_ = (VEC(T) **) arg_;                                      \
   if (*vec_)                                                             \
     vec_free_ (*vec_);                                                   \
   *vec_ = NULL;                                                                  \
@@ -1058,7 +1053,7 @@ static inline void VEC_OP (T,free)                                          \
 static inline void VEC_OP (T,cleanup)                                    \
      (void *arg_)                                                        \
 {                                                                        \
-  VEC(T) **vec_ = arg_;                                                          \
+  VEC(T) **vec_ = (VEC(T) **) arg_;                                      \
   if (*vec_)                                                             \
     vec_free_ (*vec_);                                                   \
   *vec_ = NULL;                                                                  \
This page took 0.025719 seconds and 4 git commands to generate.