Debian Codegraph @

ffi/constant.c

raw
1 #include <ffi_platypus_bundle.h>
2
3 #ifdef _MSC_VER
4 #define EXPORT __declspec(dllexport)
5 #else
6 #define EXPORT
7 #endif
8
9 EXPORT
10 ffi_platypus_constant_t *
11 ffi_platypus_constant__new(void* set_str,
12 void* set_sint,
13 void* set_uint,
14 void* set_double)
15 {
16 ffi_platypus_constant_t *self = malloc(sizeof(ffi_platypus_constant_t));
17 self->set_str = set_str;
18 self->set_sint = set_sint;
19 self->set_uint = set_uint;
20 self->set_double = set_double;
21 return self;
22 }
23
24 EXPORT
25 void
26 ffi_platypus_constant__DESTROY(ffi_platypus_constant_t *self)
27 {
28 free(self);
29 }