|
Serene Runtime 1.0.0
C runtime for the Serene programming language
|
#include "serene/utils.h"#include <stdio.h>#include <stdlib.h>#include "config.h"#include "serene/rt/context.h"#include "serene/rt/mm/interface.h"#include <string.h>Go to the source code of this file.
Functions | |
| void | srn_panic (const char *msg, const char *file, size_t line, const char *fn) |
| TODO(lxsameer): unwind the stack. | |
| char * | srn_copy_bytes (srn_context_t *ctx, const char *src, size_t len, size_t alignment) |
| char * | srn_dup_str (srn_mm_t *mm, const char *s) |
Copy a null terminated C string into a fresh allocation made through mm. | |
| char * srn_copy_bytes | ( | srn_context_t * | ctx, |
| const char * | src, | ||
| size_t | len, | ||
| size_t | alignment ) |
Definition at line 42 of file utils.c.
| char * srn_dup_str | ( | srn_mm_t * | mm, |
| const char * | s ) |
Copy a null terminated C string into a fresh allocation made through mm.
Returns nullptr on allocation failure.
Definition at line 56 of file utils.c.
| void srn_panic | ( | const char * | msg, |
| const char * | file, | ||
| size_t | line, | ||
| const char * | fn ) |
TODO(lxsameer): unwind the stack.
Definition at line 31 of file utils.c.