aboutsummaryrefslogtreecommitdiff
path: root/src/std/buffer_view.c
blob: 8ddfab94c83fc1e4a8804b0868ee2b15f1b06b0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "../../include/std/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;
}