mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 16:47:28 +01:00
Let wuffs_aux's MemoryInput take a char* ptr
This commit is contained in:
1 parent
2742a4f4be
commit
ca1113620b
4 files changed
+16
-2
No files matched your search
@@ -8455,6 +8455,7 @@ class FileInput : public Input {
|
||||
// It does not take responsibility for freeing the memory when done.
|
||||
class MemoryInput : public Input {
|
||||
public:
|
||||
MemoryInput(const char* ptr, size_t len);
|
||||
MemoryInput(const uint8_t* ptr, size_t len);
|
||||
|
||||
virtual IOBuffer* BringsItsOwnIOBuffer();
|
||||
@@ -28999,6 +29000,12 @@ FileInput::CopyIn(IOBuffer* dst) {
|
||||
|
||||
// --------
|
||||
|
||||
MemoryInput::MemoryInput(const char* ptr, size_t len)
|
||||
: m_io(wuffs_base__ptr_u8__reader(
|
||||
static_cast<uint8_t*>(static_cast<void*>(const_cast<char*>(ptr))),
|
||||
len,
|
||||
true)) {}
|
||||
|
||||
MemoryInput::MemoryInput(const uint8_t* ptr, size_t len)
|
||||
: m_io(wuffs_base__ptr_u8__reader(const_cast<uint8_t*>(ptr), len, true)) {}
|
||||
|
||||
|
||||
Reference in new issue
Block a user