Skip to content

Commit

Permalink
pw_containers: Rename VariableLengthEntryQueue files
Browse files Browse the repository at this point in the history
VariableLengthEntryQueue is being renamed to InlineVarLenEntryQueue.
This change moves the files to prepare for the rename.

Change-Id: Ibca0903dc7c5d31bf3490c21c45add423e31303a
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/187310
Pigweed-Auto-Submit: Wyatt Hepler <[email protected]>
Reviewed-by: Armando Montanez <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
  • Loading branch information
255 authored and CQ Bot Account committed Feb 26, 2024
1 parent e589acd commit 17c5867
Show file tree
Hide file tree
Showing 16 changed files with 44 additions and 44 deletions.
2 changes: 1 addition & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ group("build_with_pw_minimal_cpp_stdlib") {
# This list of supported modules is incomplete.
deps = [
"$dir_pw_base64($_toolchain)",
"$dir_pw_containers:variable_length_entry_queue($_toolchain)",
"$dir_pw_containers:inline_var_len_entry_queue($_toolchain)",
"$dir_pw_status($_toolchain)",
"$dir_pw_tokenizer:base64($_toolchain)",
"$dir_pw_tokenizer($_toolchain)",
Expand Down
2 changes: 1 addition & 1 deletion docs/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ _doxygen_input_files = [ # keep-sorted: start
"$dir_pw_containers/public/pw_containers/filtered_view.h",
"$dir_pw_containers/public/pw_containers/inline_deque.h",
"$dir_pw_containers/public/pw_containers/inline_queue.h",
"$dir_pw_containers/public/pw_containers/variable_length_entry_queue.h",
"$dir_pw_containers/public/pw_containers/inline_var_len_entry_queue.h",
"$dir_pw_crypto/public/pw_crypto/ecdsa.h",
"$dir_pw_crypto/public/pw_crypto/sha256.h",
"$dir_pw_digital_io/public/pw_digital_io/digital_io.h",
Expand Down
14 changes: 7 additions & 7 deletions pw_containers/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ cc_library(
)

cc_library(
name = "variable_length_entry_queue",
srcs = ["variable_length_entry_queue.c"],
hdrs = ["public/pw_containers/variable_length_entry_queue.h"],
name = "inline_var_len_entry_queue",
srcs = ["inline_var_len_entry_queue.c"],
hdrs = ["public/pw_containers/inline_var_len_entry_queue.h"],
includes = ["public"],
deps = [
":raw_storage",
Expand Down Expand Up @@ -195,13 +195,13 @@ pw_cc_test(
)

pw_cc_test(
name = "variable_length_entry_queue_test",
name = "inline_var_len_entry_queue_test",
srcs = [
"pw_containers_private/variable_length_entry_queue_test_oracle.h",
"variable_length_entry_queue_test.cc",
"inline_var_len_entry_queue_test.cc",
"pw_containers_private/inline_var_len_entry_queue_test_oracle.h",
],
deps = [
":variable_length_entry_queue",
":inline_var_len_entry_queue",
"//pw_bytes",
],
)
Expand Down
16 changes: 8 additions & 8 deletions pw_containers/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ pw_source_set("to_array") {
public = [ "public/pw_containers/to_array.h" ]
}

pw_source_set("variable_length_entry_queue") {
pw_source_set("inline_var_len_entry_queue") {
public_configs = [ ":public_include_path" ]
public_deps = [ dir_pw_varint ]
deps = [ dir_pw_assert ]
public = [ "public/pw_containers/variable_length_entry_queue.h" ]
sources = [ "variable_length_entry_queue.c" ]
public = [ "public/pw_containers/inline_var_len_entry_queue.h" ]
sources = [ "inline_var_len_entry_queue.c" ]

# TODO: b/259746255 - Remove this when everything compiles with -Wconversion.
configs = [ "$dir_pw_build:conversion_warnings" ]
Expand Down Expand Up @@ -144,7 +144,7 @@ pw_test_group("tests") {
":intrusive_list_test",
":raw_storage_test",
":to_array_test",
":variable_length_entry_queue_test",
":inline_var_len_entry_queue_test",
":vector_test",
":wrapped_iterator_test",
]
Expand Down Expand Up @@ -234,13 +234,13 @@ pw_test("to_array_test") {
configs = [ "$dir_pw_build:conversion_warnings" ]
}

pw_test("variable_length_entry_queue_test") {
pw_test("inline_var_len_entry_queue_test") {
sources = [
"pw_containers_private/variable_length_entry_queue_test_oracle.h",
"variable_length_entry_queue_test.cc",
"inline_var_len_entry_queue_test.cc",
"pw_containers_private/inline_var_len_entry_queue_test_oracle.h",
]
deps = [
":variable_length_entry_queue",
":inline_var_len_entry_queue",
dir_pw_bytes,
]

Expand Down
14 changes: 7 additions & 7 deletions pw_containers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ pw_add_library(pw_containers.to_array INTERFACE
public
)

pw_add_library(pw_containers.variable_length_entry_queue STATIC
pw_add_library(pw_containers.inline_var_len_entry_queue STATIC
HEADERS
public/pw_containers/variable_length_entry_queue.h
public/pw_containers/inline_var_len_entry_queue.h
PUBLIC_INCLUDES
public
PUBLIC_DEPS
Expand All @@ -111,7 +111,7 @@ pw_add_library(pw_containers.variable_length_entry_queue STATIC
PRIVATE_DEPS
pw_assert
SOURCES
variable_length_entry_queue.c
inline_var_len_entry_queue.c
)

pw_add_library(pw_containers.vector INTERFACE
Expand Down Expand Up @@ -231,13 +231,13 @@ pw_add_test(pw_containers.to_array_test
pw_containers
)

pw_add_test(pw_containers.variable_length_entry_queue_test
pw_add_test(pw_containers.inline_var_len_entry_queue_test
SOURCES
pw_containers_private/variable_length_entry_queue_test_oracle.h
variable_length_entry_queue_test.cc
pw_containers_private/inline_var_len_entry_queue_test_oracle.h
inline_var_len_entry_queue_test.cc
PRIVATE_DEPS
pw_bytes
pw_containers.variable_length_entry_queue
pw_containers.inline_var_len_entry_queue
)

pw_add_test(pw_containers.vector_test
Expand Down
8 changes: 4 additions & 4 deletions pw_containers/docs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pw::InlineQueue
----------------------------
pw::VariableLengthEntryQueue
----------------------------
.. doxygenfile:: pw_containers/variable_length_entry_queue.h
.. doxygenfile:: pw_containers/inline_var_len_entry_queue.h
:sections: detaileddescription

Example
Expand Down Expand Up @@ -139,18 +139,18 @@ API Reference
===============
C++
---
.. doxygengroup:: variable_length_entry_queue_cpp_api
.. doxygengroup:: inline_var_len_entry_queue_cpp_api
:content-only:
:members:

C
-
.. doxygengroup:: variable_length_entry_queue_c_api
.. doxygengroup:: inline_var_len_entry_queue_c_api
:content-only:

Python
------
.. automodule:: pw_containers.variable_length_entry_queue
.. automodule:: pw_containers.inline_var_len_entry_queue
:members:

-----------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// License for the specific language governing permissions and limitations under
// the License.

#include "pw_containers/variable_length_entry_queue.h"
#include "pw_containers/inline_var_len_entry_queue.h"

#include <string.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
// License for the specific language governing permissions and limitations under
// the License.

#include "pw_containers/variable_length_entry_queue.h"
#include "pw_containers/inline_var_len_entry_queue.h"

#include <cstring>
#include <string_view>
#include <variant>

#include "pw_containers_private/variable_length_entry_queue_test_oracle.h"
#include "pw_containers_private/inline_var_len_entry_queue_test_oracle.h"
#include "pw_unit_test/framework.h"

namespace {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "pw_preprocessor/util.h"
#include "pw_varint/varint.h"

/// @file pw_containers/variable_length_entry_queue.h
/// @file pw_containers/inline_var_len_entry_queue.h
///
/// A `VariableLengthEntryQueue` is a queue of inline variable-length binary
/// entries. It is implemented as a ring (circular) buffer and supports
Expand Down Expand Up @@ -53,7 +53,7 @@
extern "C" {
#endif // __cplusplus

/// @defgroup variable_length_entry_queue_c_api VariableLengthEntryQueue C API
/// @defgroup inline_var_len_entry_queue_c_api VariableLengthEntryQueue C API
/// @{

/// Handle that refers to a `VariableLengthEntryQueue`. In memory, the queue
Expand Down Expand Up @@ -335,7 +335,7 @@ class BasicVariableLengthEntryQueue : public BasicVariableLengthEntryQueue<
uint32_t data_[_PW_VAR_QUEUE_DATA_SIZE_UINT32(kMaxSizeBytes)];
};

/// @defgroup variable_length_entry_queue_cpp_api
/// @defgroup inline_var_len_entry_queue_cpp_api
/// @{

/// Variable-length entry queue class template for any byte type (e.g.
Expand Down
4 changes: 2 additions & 2 deletions pw_containers/py/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ pw_python_package("py") {
}
sources = [
"pw_containers/__init__.py",
"pw_containers/variable_length_entry_queue.py",
"pw_containers/inline_var_len_entry_queue.py",
]
tests = [ "variable_length_entry_queue_test.py" ]
tests = [ "inline_var_len_entry_queue_test.py" ]
pylintrc = "$dir_pigweed/.pylintrc"
mypy_ini = "$dir_pigweed/.mypy.ini"
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import unittest

from pw_containers import variable_length_entry_queue
from pw_containers import inline_var_len_entry_queue


def _buffer(head: int, tail: int, data: bytes) -> bytes:
Expand All @@ -29,7 +29,7 @@ class TestEncodeTokenized(unittest.TestCase):
def test_one_entry(self) -> None:
self.assertEqual(
list(
variable_length_entry_queue.parse(
inline_var_len_entry_queue.parse(
_buffer(1, 6, b'?\0041234?890')
)
),
Expand All @@ -39,7 +39,7 @@ def test_one_entry(self) -> None:
def test_two_entries(self) -> None:
self.assertEqual(
list(
variable_length_entry_queue.parse(
inline_var_len_entry_queue.parse(
_buffer(1, 7, b'?\00212\00234?90')
)
),
Expand All @@ -49,7 +49,7 @@ def test_two_entries(self) -> None:
def test_two_entries_wrapped(self) -> None:
self.assertEqual(
list(
variable_length_entry_queue.parse(
inline_var_len_entry_queue.parse(
_buffer(6, 4, b'4\00212?x\004123')
)
),
Expand Down
2 changes: 1 addition & 1 deletion pw_tokenizer/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ cc_library(
visibility = ["//visibility:private"],
deps = [
":pw_tokenizer",
"//pw_containers:variable_length_entry_queue",
"//pw_containers:inline_var_len_entry_queue",
],
)

Expand Down
2 changes: 1 addition & 1 deletion pw_tokenizer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ pw_test("tokenize_c99_test") {
]
deps = [
":pw_tokenizer",
"$dir_pw_containers:variable_length_entry_queue",
"$dir_pw_containers:inline_var_len_entry_queue",
]
}

Expand Down
4 changes: 2 additions & 2 deletions pw_tokenizer/tokenize_c99_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
-Ipw_varint/public \
pw_tokenizer/tokenize_c99_test.c \
pw_varint/varint_c.c \
pw_containers/variable_length_entry_queue.c
pw_containers/inline_var_len_entry_queue.c
*/

#include <inttypes.h>
#include <stdarg.h>
#include <stdint.h>
#include <string.h>

#include "pw_containers/variable_length_entry_queue.h"
#include "pw_containers/inline_var_len_entry_queue.h"
#include "pw_tokenizer/encode_args.h"
#include "pw_tokenizer/tokenize.h"
#include "pw_varint/varint.h"
Expand Down

0 comments on commit 17c5867

Please sign in to comment.