ladybird/AK/FFIHelpers.h
R-Goc 520a7c8ebd AK+LibWeb: Centralize FFI helper functions
This commit creates a central FFIHelpers.h header which implements
common conversions from FFI.
2026-05-28 14:15:43 -05:00

25 lines
430 B
C++

/*
* Copyright (c) 2026-present, the Ladybird developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Forward.h>
namespace AK {
FlyString ffi_fly_string(u8 const* ptr, size_t len);
String ffi_string(u8 const* ptr, size_t len);
StringView ffi_string_view(u8 const* ptr, size_t len);
}
#ifdef USING_AK_GLOBALLY
using AK::ffi_fly_string;
using AK::ffi_string;
using AK::ffi_string_view;
#endif