Skip to content

Commit ce37067

Browse files
committed
Patch example_restype.c
1 parent 097ad05 commit ce37067

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

example_restype.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@ typedef struct {
2222
#define EXAMPLES_RES(res) ((examples_res_t*)res->data.raw)
2323

2424
void delete_example_res(example_res_t* example_res) {
25-
// deallocate everything again through s3dat_free_func
26-
s3dat_free_func(example_res->parent, example_res);
25+
// deallocate everything again through s3util_free_func
26+
s3util_free_func(s3dat_memset(example_res->parent), example_res);
2727
}
2828

29-
example_res_t* create_example_res(s3dat_t* handle, s3dat_exception_t** throws) {
30-
// allocate everything through s3dat_alloc_func
29+
example_res_t* create_example_res(s3dat_t* handle, s3util_exception_t** throws) {
30+
// allocate everything through s3util_alloc_func
3131
example_res_t* eres = s3util_alloc_func(s3dat_memset(handle), sizeof(example_res_t), throws);
3232

3333
// it wont do anything, if *throws == null (there is no exception)
3434
s3util_add_to_stack(s3dat_memset(handle), throws, __FILE__, __func__, __LINE__);
3535
return eres;
3636
}
3737

38-
s3dat_restype_t example_restype = {"example_res", (void (*) (void*)) delete_example_res, (void* (*) (void*, s3dat_exception_t**)) create_example_res};
38+
s3dat_restype_t example_restype = {"example_res", (void (*) (void*)) delete_example_res, (void* (*) (void*, s3util_exception_t**)) create_example_res};
3939

4040
bool is_example_res(s3dat_ref_t* res) {
4141
return res->type == &example_restype;

0 commit comments

Comments
 (0)