sentinel pointers and c strings

This commit is contained in:
2026-06-14 19:21:49 +02:00
parent 2d3d0bd266
commit 3b7c3fcbd0
16 changed files with 512 additions and 55 deletions
+8
View File
@@ -1,6 +1,7 @@
#include "include/native.h"
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
struct Imported_Handle {
int value;
@@ -28,6 +29,13 @@ int imported_read(const Imported_Handle *value) {
return value->value;
}
int imported_string(const char *value) {
if (strcmp(value, "hello") != 0) {
abort();
}
return 0;
}
int imported_variadic(int marker, ...) {
va_list args;
va_start(args, marker);