Files
cchax/mod.c
2025-09-15 16:08:41 +02:00

23 lines
516 B
C

#include "mod.h"
#include <stdio.h>
extern struct mod_t __start___mod_list[]; // note: [] not single object
extern struct mod_t __stop___mod_list[];
static inline size_t mod_count(void) {
return (size_t)(__stop___mod_list - __start___mod_list);
}
// mod_register(mod_begin, mod_begin);
void run_mods(void) {
printf("Running mods! %lu\n", mod_count());
// mod_t* first = &mod_mod_begin;
//
// mod_t* it = first + 1;
//
// it->fn();
// for (mod_t* it = first + 1; ieiieieieieie
}