stk module count function, remove stk_ids since handles will be used as "ids" and typedef for stk module functions
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define STK_H
|
||||
|
||||
#include "stk_version.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -10,6 +11,7 @@ extern "C" {
|
||||
int stk_init(void);
|
||||
int stk_shutdown(void);
|
||||
|
||||
size_t stk_module_count(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
+9
-6
@@ -1,9 +1,12 @@
|
||||
#include "stk.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
static void **stk_handles = NULL;
|
||||
static void (**stk_inits)(void) = NULL;
|
||||
static void (**stk_shutdowns)(void) = NULL;
|
||||
static const char **stk_ids = NULL;
|
||||
typedef void (*stk_module_func)(void);
|
||||
|
||||
static size_t stk_module_count = 0;
|
||||
static size_t stk_module_capacity = 0;
|
||||
static void **stk_handles = NULL;
|
||||
static stk_module_func *stk_inits = NULL;
|
||||
static stk_module_func *stk_shutdowns = NULL;
|
||||
|
||||
static size_t module_count = 0;
|
||||
|
||||
size_t stk_module_count(void) { return module_count; }
|
||||
|
||||
Reference in New Issue
Block a user