Cthulhu  0.2.10
Cthulhu compiler collection
view.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: LGPL-3.0-only
2 #pragma once
3 
4 // for sizeof(io_t)
5 #include "io/impl.h" // IWYU pragma: export
6 
8 
11 
14 typedef struct io_view_impl_t
15 {
17  const char *data;
18 
20  size_t size;
21 
23  size_t offset;
25 
26 #define IO_VIEW_SIZE (sizeof(io_view_impl_t) + sizeof(io_t))
27 
29 
#define CT_BEGIN_API
Definition: compiler.h:129
#define CT_END_API
Definition: compiler.h:130
a non-owning, readonly view of a buffer
Definition: view.h:15
size_t offset
current offset in data
Definition: view.h:23
size_t size
size of data
Definition: view.h:20
const char * data
pointer to data
Definition: view.h:17