mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-24 15:07:37 +03:00
19 lines
430 B
C
19 lines
430 B
C
#include "refc_util.h"
|
|
|
|
#include <stdarg.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
void idris2_refc_verify_failed(const char *file, int line, const char *cond,
|
|
const char *fmt, ...) {
|
|
va_list ap;
|
|
va_start(ap, fmt);
|
|
|
|
char message[1000];
|
|
snprintf(message, sizeof(message), fmt, ap);
|
|
|
|
fprintf(stderr, "assertion failed in %s:%d: %s: %s\n", file, line, cond,
|
|
message);
|
|
abort();
|
|
}
|