aboutsummaryrefslogtreecommitdiff
path: root/src/buffer_view.c
blob: 96b0dd752b258f648a488cefaf7cf8253e51a4ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "../include/buffer_view.h"

BufferView create_buffer_view_null() {
    BufferView buffer_view;
    buffer_view.data = NULL;
    buffer_view.size = 0;
    return buffer_view;
}

BufferView create_buffer_view(const char *data, usize size) {
    BufferView buffer_view;
    buffer_view.data = data;
    buffer_view.size = size;
    return buffer_view;
}