14 lines
447 B
C
14 lines
447 B
C
#include "hydroforth/hydroforth.h"
|
|
|
|
void hydroforth__result__add_backtrace(HYDROFORTH__RESULT *const result, const char *const s)
|
|
{
|
|
realloc(result->backtrace, sizeof(char *) * (result->backtrace_len + 1));
|
|
result->backtrace[result->backtrace_len++] = s;
|
|
}
|
|
|
|
void hydroforth__result__set(HYDROFORTH__RESULT *const result, HYDROFORTH__ERROR error, const char *const s)
|
|
{
|
|
result->error = error;
|
|
hydroforth__result__add_backtrace(result, s);
|
|
}
|