blob: f66ae19e69d3f403af1d9b5905f9db04dc96e112 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include "../src/util.h"
#include "ref.h"
UwUVMValue uwuref_create(UwUVMFunction *function)
{
return (UwUVMValue) {
.type = &uwuref_type,
.data = function,
};
}
static void *uwuref_copy(void *data)
{
return data;
}
static void uwuref_delete(void *data)
{
(void) data;
}
static char *uwuref_print(void *data)
{
return asprintf_wrapper("[Function reference: %p]", data);
}
UwUVMType uwuref_type = {
.copy = &uwuref_copy,
.delete = &uwuref_delete,
.print = &uwuref_print,
};
|