2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00

pvector: Move PVECTOR_EXTRA_ALLOC to pvector.c.

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>
Acked-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Jarno Rajahalme
2016-07-29 11:04:48 -07:00
parent 4fee8b1364
commit 3d0dc308a4
2 changed files with 6 additions and 6 deletions

View File

@@ -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)
{

View File

@@ -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. */