@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Nicira, Inc.
+ * Copyright (c) 2014, 2016 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,10 @@
#include <config.h>
#include "pvector.h"
+/* Writers will preallocate space for some entries at the end to avoid future
+ * reallocations. */
+enum { PVECTOR_EXTRA_ALLOC = 4 };
+
static struct pvector_impl *
pvector_impl_get(const struct pvector *pvec)
{
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Nicira, Inc.
+ * Copyright (c) 2014, 2016 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -63,10 +63,6 @@ struct pvector_entry {
void *ptr;
};
-/* Writers will preallocate space for some entries at the end to avoid future
- * reallocations. */
-enum { PVECTOR_EXTRA_ALLOC = 4 };
-
struct pvector_impl {
size_t size; /* Number of entries in the vector. */
size_t allocated; /* Number of allocated entries. */
There is no need to expose PVECTOR_EXTRA_ALLOC in the API. Suggested-by: Ben Pfaff <blp@ovn.org> Signed-off-by: Jarno Rajahalme <jarno@ovn.org> --- lib/pvector.c | 6 +++++- lib/pvector.h | 6 +----- 2 files changed, 6 insertions(+), 6 deletions(-)