#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdatomic.h>
#include "../../include/utils/errors.h"
Go to the source code of this file.
◆ cg_error_string()
char* cg_error_string |
( |
char * |
message | ) |
|
creates a new variable and moves memory of message into that variable returning it this appears to be needed as if we dont do this realloc
will complain about an invalid pointer
Definition at line 17 of file errors.c.
◆ free_cg_error()
frees up resources associated with error
Definition at line 39 of file errors.c.
◆ new_cg_error()
cg_error* new_cg_error |
( |
char * |
message | ) |
|
◆ wrap_cg_error()
int wrap_cg_error |
( |
cg_error * |
error, |
|
|
char * |
message |
|
) |
| |
appends message to the end of error->message uses realloc to maximize memory efficiency
Definition at line 28 of file errors.c.