mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:57:35 +00:00
AK: Move memory streams from LibCore
This commit is contained in:
parent
11550f582b
commit
093cf428a3
46 changed files with 213 additions and 203 deletions
|
@ -4,13 +4,13 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/MemoryStream.h>
|
||||
#include <LibCompress/Brotli.h>
|
||||
#include <LibCore/MemoryStream.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto bufstream_result = Core::Stream::FixedMemoryStream::construct({ data, size });
|
||||
auto bufstream_result = FixedMemoryStream::construct({ data, size });
|
||||
if (bufstream_result.is_error()) {
|
||||
dbgln("MemoryStream::construct() failed.");
|
||||
return 0;
|
||||
|
|
|
@ -4,15 +4,15 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/MemoryStream.h>
|
||||
#include <AK/NonnullOwnPtr.h>
|
||||
#include <LibArchive/TarStream.h>
|
||||
#include <LibCore/MemoryStream.h>
|
||||
#include <LibCore/Stream.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto input_stream_or_error = Core::Stream::FixedMemoryStream::construct({ data, size });
|
||||
auto input_stream_or_error = FixedMemoryStream::construct({ data, size });
|
||||
|
||||
if (input_stream_or_error.is_error())
|
||||
return 0;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibCore/MemoryStream.h>
|
||||
#include <AK/MemoryStream.h>
|
||||
#include <LibWasm/Types.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
@ -12,7 +12,7 @@
|
|||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
ReadonlyBytes bytes { data, size };
|
||||
auto stream_or_error = Core::Stream::FixedMemoryStream::construct(bytes);
|
||||
auto stream_or_error = FixedMemoryStream::construct(bytes);
|
||||
if (stream_or_error.is_error())
|
||||
return 0;
|
||||
auto stream = stream_or_error.release_value();
|
||||
|
|
|
@ -586,7 +586,7 @@ public:
|
|||
|
||||
static ErrorOr<NonnullOwnPtr<IPC::Message>> decode_message(ReadonlyBytes buffer, [[maybe_unused]] Core::Stream::LocalSocket& socket)
|
||||
{
|
||||
auto stream = TRY(Core::Stream::FixedMemoryStream::construct(buffer));
|
||||
auto stream = TRY(FixedMemoryStream::construct(buffer));
|
||||
auto message_endpoint_magic = TRY(stream->read_value<u32>());)~~~");
|
||||
generator.append(R"~~~(
|
||||
|
||||
|
@ -768,10 +768,10 @@ void build(StringBuilder& builder, Vector<Endpoint> const& endpoints)
|
|||
}
|
||||
|
||||
generator.appendln(R"~~~(#include <AK/Error.h>
|
||||
#include <AK/MemoryStream.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <AK/Result.h>
|
||||
#include <AK/Utf8View.h>
|
||||
#include <LibCore/MemoryStream.h>
|
||||
#include <LibIPC/Connection.h>
|
||||
#include <LibIPC/Decoder.h>
|
||||
#include <LibIPC/Dictionary.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue