Initial commit
This commit is contained in:
22
mod.c
Normal file
22
mod.c
Normal file
@@ -0,0 +1,22 @@
|
||||
#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
|
||||
}
|
||||
Reference in New Issue
Block a user