resonance
1.0.1
Loading...
Searching...
No Matches
assert.h
Go to the documentation of this file.
1
#pragma once
2
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
void
HxAssertFailed
(
const
char
*pszFile,
int
nLine,
const
char
*pszExpression);
31
#ifdef __cplusplus
32
}
33
#endif
34
35
// Every assert in the shipped code expands to this shape, which is the shape of newlib's own
36
// assert() macro. The expression text, the file, and the line all survive in .rodata, which is what
37
// fixes the line numbers recorded against the reconstructed routines.
38
#define HX_ASSERT(expression) \
39
if (!(expression)) { \
40
HxAssertFailed(__FILE__, __LINE__, #expression); \
41
}
HxAssertFailed
void HxAssertFailed(const char *pszFile, int nLine, const char *pszExpression)
Report a failed check and stop the machine.
src
os
assert.h
Generated by
1.15.0